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

Fix case of recursively nested lists #459

Merged
merged 1 commit into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion src/table.jl
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ function build(f::Meta.Field, L::ListTypes, batch, rb, de, nodeidx, bufferidx, c
# juliaeltype returns Vector for List, translate to SubArray
S = Base.nonmissingtype(T)
if S <: Vector
ST = SubVector{eltype(S), typeof(A)}
ST = SubVector{eltype(A), typeof(A)}
T = S == T ? ST : Union{Missing, ST}
end
end
Expand Down
9 changes: 9 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,15 @@ t = Arrow.Table(joinpath(dirname(pathof(Arrow)), "../test/java_compressed_zero_l

end

@testset "# 458" begin

x = (; a=[[[[1]]]])
buf = Arrow.tobuffer(x)
t = Arrow.Table(buf)
@test t.a[1][1][1][1] == 1

end

end # @testset "misc"

end