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

[RNTuple] write multiple fields #349

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Conversation

Moelf
Copy link
Member

@Moelf Moelf commented Sep 28, 2024

julia> Nitems = 10
       data = [5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
       newtable = Dict(
               "x1" => Float64.(data),
               "x2" => Float32.(data),
               "x3" => Int32.(data),
               "y1" => UInt16.(data),
           )
       UnROOT.write_rntuple(open("/tmp/a.root", "w"), newtable; rntuple_name="myntuple")
       LazyTree("/tmp/a.root", "myntuple")
 Row │ x1       y1      x2       x3
     │ Float64  UInt16  Float32  Int32
─────┼─────────────────────────────────
 1   │ 5.0      5       5.0      5
 2   │ 6.0      6       6.0      6
 3   │ 7.0      7       7.0      7
 4   │ 8.0      8       8.0      8
 5   │ 9.0      9       9.0      9
 6   │ 10.0     10      10.0     10
 7   │ 11.0     11      11.0     11
 8   │ 12.0     12      12.0     12
 9   │ 13.0     13      13.0     13
 10  │ 14.0     14      14.0     14

ROOT is unhappy

[jiling@login04 ~]$ source /cvmfs/sft.cern.ch/lcg/views/dev3/latest/x86_64-el9-gcc11-opt/setup.sh
[jiling@login04 ~]$ python
Python 3.11.9 (main, Jun 24 2024, 14:32:54) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
>>> df =  ROOT.RDataFrame("myntuple", "a.root")
[ROOT.NTuple] Warning /build/jenkins/workspace/lcg_nightly_pipeline/build/projects/ROOT-HEAD/src/ROOT/HEAD/tree/ntuple/v7/src/RPageStorageFile.cxx:326 in ROOT::Experimental::Internal::RPageSourceFile::LoadStructureImpl()::<lambda()>:0: RuntimeWarning: Pre-release format version: RC 2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
cppyy.gbl.ROOT.Experimental.RException: RDataFrame::RDataFrame(string_view treeName, string_view filenameglob, const ROOT::RDataFrame::ColumnNames_t& defaultColumns = {}) =>
    RException: invalid envelope, too short
At:
  static RResult<unsigned int> ROOT::Experimental::Internal::RNTupleSerializer::DeserializeEnvelope(const void*, uint64_t, uint16_t, uint64_t&) [/build/jenkins/workspace/lcg_nightly_pipeline/build/projects/ROOT-HEAD/src/ROOT/HEAD/tree/ntuple/v7/src/RNTupleSerialize.cxx:878]
  static ROOT::Experimental::RResult<void> ROOT::Experimental::Internal::RNTupleSerializer::DeserializeHeader(const void*, uint64_t, ROOT::Experimental::Internal::RNTupleDescriptorBuilder&) [/build/jenkins/workspace/lcg_nightly_pipeline/build/projects/ROOT-HEAD/src/ROOT/HEAD/tree/ntuple/v7/src/RNTupleSerialize.cxx:1649]
  • Do round trips within UnROOT.jl
  • make ROOT happy

Copy link

codecov bot commented Sep 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 43 lines in your changes missing coverage. Please review.

Project coverage is 56.17%. Comparing base (0679f73) to head (a9093ea).

Files with missing lines Patch % Lines
src/RNTuple/Writing/TFileWriter.jl 0.00% 41 Missing ⚠️
src/RNTuple/footer.jl 0.00% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (0679f73) and HEAD (a9093ea). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (0679f73) HEAD (a9093ea)
3 2
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #349       +/-   ##
===========================================
- Coverage   84.90%   56.17%   -28.73%     
===========================================
  Files          21       21               
  Lines        2994     2971       -23     
===========================================
- Hits         2542     1669      -873     
- Misses        452     1302      +850     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Moelf Moelf changed the title [RNTuple] write multiple cols [RNTuple] write multiple fields Sep 28, 2024
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.

1 participant