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

chore: miscellaneous RNTuple improvements #1250

Merged
merged 29 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
fcf8bf2
Fixed __len__ method
ariostas Jul 15, 2024
788fdfc
Added a few more useful methods
ariostas Jul 15, 2024
2a20562
Use the right number in arrays method
ariostas Jul 15, 2024
90641a9
Merge branch 'main' into ariostas/misc_rntuple_improvements
ariostas Aug 9, 2024
818ed93
Updated to match spec and did some cleanup
ariostas Sep 5, 2024
45c585e
Fixed order of extra type information
ariostas Sep 5, 2024
602413a
Extract column summary flags
ariostas Sep 5, 2024
9451f76
Merge branch 'main' into ariostas/misc_rntuple_improvements
ariostas Sep 26, 2024
f27235f
style: pre-commit fixes
pre-commit-ci[bot] Sep 26, 2024
2b4cc6f
Fixed conflict resolution
ariostas Sep 27, 2024
2255aae
Fixed test
ariostas Sep 27, 2024
0104778
Merge branch 'main' into ariostas/misc_rntuple_improvements
ariostas Oct 4, 2024
1c028af
Switched to using enums
ariostas Oct 4, 2024
4517904
Fixed RNTuple anchor
ariostas Oct 4, 2024
190f28f
Updated locator types
ariostas Oct 4, 2024
68df9d6
Removed UserMetadata envelope
ariostas Oct 4, 2024
2449ee3
Started implementing new real32 types
ariostas Oct 4, 2024
70a86e7
Updated sharded cluster to match spec
ariostas Oct 4, 2024
0146871
Removed user metadata from footer
ariostas Oct 4, 2024
e261abc
Fixed ClusterSummaryReader
ariostas Oct 4, 2024
a24850d
Fix cascadentuple
ariostas Oct 7, 2024
3714321
Introduced RNTupleField class
ariostas Oct 9, 2024
099018a
Added test for #1285
ariostas Oct 9, 2024
1868ac5
Fixed test
ariostas Oct 9, 2024
87698ea
Fix test (attempt 2)
ariostas Oct 9, 2024
9049d27
Finalized first version of RNTupleField
ariostas Nov 4, 2024
482a34c
Added tests for RNTupleField
ariostas Nov 4, 2024
61fc792
Merge branch 'main' into ariostas/misc_rntuple_improvements
ariostas Nov 4, 2024
4ded101
Implemented iterate method
ariostas Nov 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 51 additions & 7 deletions src/uproot/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""
from __future__ import annotations

import struct
from enum import IntEnum

import numpy

Expand Down Expand Up @@ -118,8 +118,6 @@
kStreamedMemberWise = numpy.uint16(1 << 14)

############ RNTuple https://github.com/root-project/root/blob/master/tree/ntuple/v7/doc/specifications.md
_rntuple_frame_format = struct.Struct("<Q")
rntuple_env_header = _rntuple_frame_format.pack(0) # TODO: need to check this
rntuple_col_num_to_dtype_dict = {
1: "uint64",
2: "uint32",
Expand Down Expand Up @@ -149,6 +147,8 @@
26: "int64", # split + zigzag encoding
27: "int32", # split + zigzag encoding
28: "int16", # split + zigzag encoding
29: "float32trunc",
30: "float32quant",
}
rntuple_col_num_to_size_dict = {
1: 64,
Expand Down Expand Up @@ -179,6 +179,8 @@
26: 64, # split + zigzag encoding
27: 32, # split + zigzag encoding
28: 16, # split + zigzag encoding
29: 32, # TODO: variable size
30: 32, # TODO: variable size
}

rntuple_col_type_to_num_dict = {
Expand Down Expand Up @@ -212,7 +214,49 @@
"splitzigzagint16": 28,
}

rntuple_role_leaf = 0
rntuple_role_vector = 1
rntuple_role_struct = 2
rntuple_role_union = 3

class RNTupleLocatorType(IntEnum):
STANDARD = 0x00
LARGE = 0x01
DAOS = 0x02


class RNTupleEnvelopeType(IntEnum):
RESERVED = 0x00
HEADER = 0x01
FOOTER = 0x02
PAGELIST = 0x03


class RNTupleFieldRole(IntEnum):
LEAF = 0x00
VECTOR = 0x01
STRUCT = 0x02
UNION = 0x03
UNSPLIT = 0x04


class RNTupleFieldFlag(IntEnum):
REPETITIVE = 0x01
PROJECTED = 0x02
CHECKSUM = 0x04


class RNTupleColumnFlag(IntEnum):
DEFERRED = 0x08
RANGE = 0x10


class RNTupleExtraTypeIdentifier(IntEnum):
ROOT = 0x00


class RNTupleUserMetadataType(IntEnum):
INT = 0x01
BOOL = 0x02
DOUBLE = 0x03
STRING = 0x04


class RNTupleClusterFlag(IntEnum):
SHARDED = 0x01
Loading
Loading