Skip to content

[ntuple] Add support for "friend ntuples"#6979

Merged
jblomer merged 15 commits intoroot-project:masterfrom
jblomer:ntuple-friends
Apr 27, 2021
Merged

[ntuple] Add support for "friend ntuples"#6979
jblomer merged 15 commits intoroot-project:masterfrom
jblomer:ntuple-friends

Conversation

@jblomer
Copy link
Copy Markdown
Contributor

@jblomer jblomer commented Jan 4, 2021

Adds a new, virtual page source, RPageSourceFriends, that takes a list of other page sources in order to combine them horizontally. The friends page source constructs a virtual descriptor and maps field, column, and cluster IDs from virtual to physical ones and back.

Note that this PR introduces a change to the cluster semantics: clusters do not need to cover all the columns for an event range but they can cover only a part of it (a shard). Columns that are linked (e.g. offset column and value column, columns belonging to the same field subtree) should still be part of only a single cluster.

Remaining todos:

  • Improve comments
  • Implement RPageSourceFriends::Clone()

@jblomer jblomer self-assigned this Jan 4, 2021
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@jblomer jblomer marked this pull request as draft January 4, 2021 08:23
@phsft-bot
Copy link
Copy Markdown

Build failed on ROOT-debian10-i386/cxx14.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-01-04T08:24:25.267Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1009 (message):

@phsft-bot
Copy link
Copy Markdown

Build failed on ROOT-fedora30/cxx14.
Running on root-fedora30-1.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-01-04T08:24:26.149Z] CMake Error at /build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1009 (message):

@phsft-bot
Copy link
Copy Markdown

Build failed on ROOT-fedora31/noimt.
Running on root-fedora-31-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-01-04T08:24:26.146Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1009 (message):

@phsft-bot
Copy link
Copy Markdown

Build failed on mac11.0/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-01-04T08:24:25.387Z] CMake Error at /Users/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1009 (message):

@jblomer jblomer changed the title [ntuple] Add support for friends [ntuple] Add support for friend ntuples Jan 4, 2021
@phsft-bot
Copy link
Copy Markdown

Build failed on ROOT-ubuntu16/nortcxxmod.
Running on sft-ubuntu-1604-1.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-01-04T08:24:38.522Z] CMake Error at /mnt/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1009 (message):

@jblomer jblomer changed the title [ntuple] Add support for friend ntuples [ntuple] Add support for befriending ntuples Jan 4, 2021
@phsft-bot
Copy link
Copy Markdown

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Errors:

  • [2021-01-04T08:24:56.830Z] CMake Error at C:/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1009 (message):

@jblomer jblomer changed the title [ntuple] Add support for befriending ntuples [ntuple] Add support for "friend ntuples" Jan 4, 2021
@phsft-bot
Copy link
Copy Markdown

Build failed on mac1014/python3.
Running on macitois21.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2021-01-04T08:25:27.809Z] CMake Error at /Volumes/HD2/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1009 (message):

@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Copy Markdown

Build failed on mac11.0/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@eguiraud
Copy link
Copy Markdown
Contributor

eguiraud commented Jan 4, 2021

[are we set on the (super-ambiguous, imho) "friend" terminology? some possible alternatives: horizontal stack, column-wise concat, field-wise concat, horizontal concat...]

@mxxo
Copy link
Copy Markdown
Contributor

mxxo commented Jan 6, 2021

some possible alternatives: horizontal stack, column-wise concat, field-wise concat, horizontal concat...]

I'm not sure if it lines up with the SQL term exactly but we could use "join" (column-join, field-join, etc.)

@pcanal
Copy link
Copy Markdown
Member

pcanal commented Jan 6, 2021

Is there a provision/design for the case where the entries in the "friend" are not aligned (either because the friend is missing entries, or has more entries and/or they are in a different order)?

@couet couet removed their request for review February 12, 2021 07:21
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@jblomer jblomer marked this pull request as ready for review March 23, 2021 17:10
@jblomer
Copy link
Copy Markdown
Contributor Author

jblomer commented Mar 23, 2021

@pcanal This should be ready for review. I think the way to later allow for unaligned friends is through combining friends with another virtual page source that gives access to the underlying page source with an entry list (or another mechanism for shuffling & skimming the original entries).

I like @mxxo suggestion of renaming friends to "joins" or joined ntuples. @eguiraud @Axel-Naumann what do you think?

@jblomer jblomer requested a review from pcanal March 23, 2021 17:16
@eguiraud
Copy link
Copy Markdown
Contributor

About the name of the feature, my two cents: I think "join" has the huge advantage that it is what users (both database-savvy and not) would instinctively search for in a lot of cases. "Joined ntuples" is a better wording if what you can do is basically a horizontal "paste". If you can actually build relations between two ntuples based on entry values, then it's basically an analog of the SQL "join" so even just "join" is not misleading.

FindNextClusterId and FindPrevClusterId to travers clusters by entry number.
*/
// clang-format on
class RClusterDescriptorRange {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you mean the suffix 'Range'? If so would you have some sort of range start and end end that is different in each instance of RClusterDescriptorRange ? (ie. see std::span or even RNTupleClusterRange :) )

Maybe RClusterDescriptorIteratable and then instead of GetClusterRange something like make_iteratable or GetClusterIteratable? (Another alternative I can think of is to use 'Collectioninstead ofIteratable` but that might be over-promising)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As discussed, I added a corresponding TODO because there are other *Range classes similar to RClusterDescriptorRange that should be renamed consistently.

@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@jblomer jblomer requested a review from pcanal April 23, 2021 13:36
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@jblomer jblomer merged commit 8dc8e8f into root-project:master Apr 27, 2021
@jblomer jblomer deleted the ntuple-friends branch April 27, 2021 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants