Skip to content
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] Refactor RNTupleJoinProcessor::LoadEntry #17270

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

enirolf
Copy link
Contributor

@enirolf enirolf commented Dec 13, 2024

Refactoring RNTupleJoinProcessor::LoadEntry, along with the added documentation should make it easier to follow the entry loading logic (in particular between the primary ntuple and the auxiliary one, and the different code paths for aligned and unaligned joins) and more robust to other (future) code changes.

Related to #17132.

@enirolf enirolf self-assigned this Dec 13, 2024
@enirolf enirolf requested a review from jblomer as a code owner December 13, 2024 13:39
Copy link

github-actions bot commented Dec 13, 2024

Test Results

    18 files      18 suites   3d 22h 56m 12s ⏱️
 2 678 tests  2 678 ✅ 0 💤 0 ❌
46 484 runs  46 484 ✅ 0 💤 0 ❌

Results for commit 8fa6570.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@jblomer jblomer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just minor suggestions.

}

// For each auxiliary field, load its value according to the entry number we just found of the ntuple it belongs to.
for (auto &[fieldName, fieldContext] : fFieldContexts) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (auto &[fieldName, fieldContext] : fFieldContexts) {
for (const auto &[_, fieldContext] : fFieldContexts) {

@@ -403,32 +403,42 @@ ROOT::Experimental::NTupleSize_t ROOT::Experimental::RNTupleJoinProcessor::Advan

void ROOT::Experimental::RNTupleJoinProcessor::LoadEntry()
{
// Read the values of the primary ntuple. If no index is used (i.e., the join is aligned), also read the values of
// auxiliary ntuples.
for (auto &[fieldName, fieldContext] : fFieldContexts) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (auto &[fieldName, fieldContext] : fFieldContexts) {
for (const auto &[_, fieldContext] : fFieldContexts) {

This refactor (along with more documentation) makes it easier to follow
the entry loading logic.
@enirolf enirolf force-pushed the ntuple-processor-join-refactor branch from 396441f to 8fa6570 Compare December 17, 2024 09:55
@enirolf enirolf merged commit 81f2857 into root-project:master Dec 17, 2024
21 checks passed
@enirolf enirolf deleted the ntuple-processor-join-refactor branch December 17, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants