Skip to content

StackOverflow in from_table() #115

Open

Description

@Moelf

I think this really is telling us that our type-based recursive construction/deconstruction is no godd:

works

julia> using UnROOT, AwkwardArray

julia> df = LazyTree("/home/akako/.julia/dev/UnROOT/test/samples/RNTuple/Run2012BC_DoubleMuParked_Muons_rntuple_1000evts.root", "Events");

julia> ak = AwkwardArray.from_table(df);

julia> ak[1]
{_collection0: [{Muon_pt: ..., ...}, ...], Muon_pt: [...], Muon_eta: [...], ...}

doesn't work

julia> df = LazyTree("/home/akako/.julia/dev/UnROOT/test/samples/NanoAODv5_sample.root", "Events");

julia> ak = AwkwardArray.from_table(df);

...

ROOT.Nojagg, Array{Bool, 1}}, UnROOT.LazyBranch{Bool, UnROOT.Nojagg, Array{Bool, 1}}, UnROOT.LazyBranch{Bool, UnROOT.Nojagg, Array{Bool, 1}}, UnROOT.LazyBranch{UInt8, UnROOT.Nojagg, Array{UInt8, 1}}, UnROOT.LazyBranch{Bool, UnROOT.Nojagg, Array{Bool, 1}}}}})
Encountered stack overflow.
This might be caused by recursion over very long tuples or argument lists.

Activity

  1. changed the title [-]`StackOverflow` when table is too large[/-] [+]`StackOverflow` when table is too wide[/+] on Oct 23, 2024
  2. changed the title [-]`StackOverflow` when table is too wide[/-] [+]`StackOverflow` in `from_table()`[/+] on Oct 23, 2024
  3. Moelf commented on Oct 23, 2024

    @Moelf
    MemberAuthor

    Actually, the StackOverflow stems from this line:

    push!(out, NT(row))

    and if we replace NT -> NamedTuple it will work, at least for this particular NanoAOD LazyEvent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions