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

StackOverflow in from_table() #115

Open
Moelf opened this issue Oct 23, 2024 · 1 comment
Open

StackOverflow in from_table() #115

Moelf opened this issue Oct 23, 2024 · 1 comment

Comments

@Moelf
Copy link
Member

Moelf commented Oct 23, 2024

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.
@Moelf Moelf changed the title StackOverflow when table is too large StackOverflow when table is too wide Oct 23, 2024
@Moelf Moelf changed the title StackOverflow when table is too wide StackOverflow in from_table() Oct 23, 2024
@Moelf
Copy link
Member Author

Moelf commented Oct 23, 2024

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant