Skip to content

Commit

Permalink
[ntuple] Add kUnknownCompressionSettings
Browse files Browse the repository at this point in the history
`0` is a valid compression setting (i.e., no compression has been
applied). We should distinguish between "no compression has been
applied" and "we don't know the compression" (for example in the case of
deferred columns where parts of it may not come from a physical storage
location).
  • Loading branch information
enirolf committed Jun 5, 2024
1 parent c767271 commit dd8caf1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tree/ntuple/v7/inc/ROOT/RNTupleDescriptor.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public:
ClusterSize_t fNElements = kInvalidClusterIndex;
/// The usual format for ROOT compression settings (see Compression.h).
/// The pages of a particular column in a particular cluster are all compressed with the same settings.
std::int64_t fCompressionSettings = 0;
int fCompressionSettings = kUnknownCompressionSettings;

// TODO(jblomer): we perhaps want to store summary information, such as average, min/max, etc.
// Should this be done on the field level?
Expand Down
2 changes: 2 additions & 0 deletions tree/ntuple/v7/inc/ROOT/RNTupleUtil.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ struct RClusterSize {
using ClusterSize_t = RClusterSize;
constexpr ClusterSize_t kInvalidClusterIndex(std::uint64_t(-1));

constexpr int kUnknownCompressionSettings = -1;

/// Helper types to present an offset column as array of collection sizes.
/// See RField<RNTupleCardinality<SizeT>> for details.
template <typename SizeT>
Expand Down

0 comments on commit dd8caf1

Please sign in to comment.