-
Notifications
You must be signed in to change notification settings - Fork 2
Closed as not planned
Description
julia> using AwkwardArray: ListOffsetArray as LOA
julia> using AwkwardArray: RecordArray as RA
julia> using AwkwardArray: PrimitiveArray as PA
julia> s = RA((; a=PA([1,2,3]), b=PA([4,5,6])))
3-element AwkwardArray.RecordArray{(:a, :b), Tuple{AwkwardArray.PrimitiveArray{Int64, Vector{Int64}, :default}, AwkwardArray.PrimitiveArray{Int64, Vector{Int64}, :default}}, :default}:
{a: 1, b: 4}
{a: 2, b: 5}
{a: 3, b: 6}
julia>
julia> aux = LOA([0,2,2,3], PA(Dummy[]))
3-element AwkwardArray.ListOffsetArray{Vector{Int64}, AwkwardArray.PrimitiveArray{Dummy, Vector{Dummy}, :default}, :default}:
#undef
0-element AwkwardArray.PrimitiveArray{Dummy, Vector{Dummy}, :default}
#undef
julia> s = RA((; a=PA([1,2,3]), b=PA([4,5,6]), c=aux))
3-element AwkwardArray.RecordArray{(:a, :b, :c), Tuple{AwkwardArray.PrimitiveArray{Int64, Vector{Int64}, :default}, AwkwardArray.PrimitiveArray{Int64, Vector{Int64}, :default}, AwkwardArray.ListOffsetArray{Vector{Int64}, AwkwardArray.PrimitiveArray{Dummy, Vector{Dummy}, :default}, :default}}, :default}:
Error showing value of type AwkwardArray.RecordArray{(:a, :b, :c), Tuple{AwkwardArray.PrimitiveArray{Int64, Vector{Int64}, :default}, AwkwardArray.PrimitiveArray{Int64, Vector{Int64}, :default}, AwkwardArray.ListOffsetArray{Vector{Int64}, AwkwardArray.PrimitiveArray{Dummy, Vector{Dummy}, :default}, :default}}, :default}:
ERROR: BoundsError: attempt to access 0-element Vector{Dummy} at index [1:2]
Stacktrace:
[1] throw_boundserror(A::Vector{Dummy}, I::Tuple{UnitRange{Int64}})Should this work? My personal belief is that this is garbage -- at any point you can't have completely empty stuff, but I do get handed this in RNTuple https://gist.github.com/Moelf/1c9bf1d3ea176c0958605afcaa9c606a:
├─ :TruthBottom ⇒ Vector
│ ├─ :offset ⇒ Leaf{UnROOT.Index64}(col=40)
│ └─ :content ⇒ Struct
│ └─ Symbol(":_0") ⇒ Struct
│ └─ Symbol(":_0") ⇒ Struct
│ └─ Symbol(":_0") ⇒ StructMetadata
Metadata
Assignees
Labels
No labels