-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ntuple] Allow changing compression of sources in RNTupleMerger #15992
[ntuple] Allow changing compression of sources in RNTupleMerger #15992
Conversation
Test Results 13 files 13 suites 2d 20h 13m 2s ⏱️ Results for commit cc6252e. ♻️ This comment has been updated with latest results. |
1d467aa
to
46b4236
Compare
5429241
to
3a1ca08
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I've added some minor, mostly optical comments
/// If `fCompressionSettings == -1` (the default), the merger will not change the compression | ||
/// of any of its sources (fast merging). Otherwise, all sources will be converted to the specified | ||
/// compression algorithm and level. | ||
int fCompressionSettings = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps use kUnknownCompressionSettings
here for consistency.
/// The fSize and fNElements member of the sealedPage parameters are always set. If sealedPage.fBuffer is nullptr, | ||
/// no data will be copied but the returned size information can be used by the caller to allocate a large enough | ||
/// buffer and call LoadSealedPage again. | ||
/// Read the packed and compressed bytes of a page into the memory buffer provided by `sealedPage`. The sealed page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very very nitpicky but if we're adding backticks here, they should probably also be added to the other comments (at least in this file).
tree/ntuple/v7/src/RNTupleMerger.cxx
Outdated
sealedPageGroups.reserve(sealedPageGroups.size() + pages.fPageInfos.size()); | ||
|
||
std::uint64_t pageNo = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest using pageNumber
or pageIdx
. I don't think we use the ..No
naming anywhere else.
tree/ntuple/v7/src/RNTupleMerger.cxx
Outdated
|
||
const auto colRangeCompressionSettings = clusterDesc.GetColumnRange(columnId).fCompressionSettings; | ||
const bool needsCompressionChange = | ||
options.fCompressionSettings != -1 && colRangeCompressionSettings != options.fCompressionSettings; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
options.fCompressionSettings != -1 && colRangeCompressionSettings != options.fCompressionSettings; | |
options.fCompressionSettings != kUnknownCompressionSettings && colRangeCompressionSettings != options.fCompressionSettings; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late review, one nit and one general comment: with growing complexity of the merger, perhaps it is time to split the main Merge function into more sub routines.
@@ -16,6 +16,7 @@ | |||
#ifndef ROOT7_RNTupleMerger | |||
#define ROOT7_RNTupleMerger | |||
|
|||
#include "Compression.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move below the include block of <ROOT/RHeader.hxx>
This Pull request:
gives RNTupleMerger the capability of changing the source RNTuples' compression while doing the merging. This can also be used to change the compression of a single RNTuple.
Depends on #15954
Changes or fixes:
Checklist: