When I run the following:
using Arrow, DataFrames
x = ((1,), (1,), (), ());
y = ((1, 2), (), (), ());
df = DataFrame(col = [x, y]);
Arrow.write("test.arrow", df)
I get the following error:
LoadError: ArgumentError: type does not have a definite number of fields
Stacktrace:
[1] fieldcount(t::Any)
@ Base .\reflection.jl:764
[2] arrowvector(::ArrowTypes.StructKind, x::ArrowTypes.ToArrow{Tuple{Int64, Vararg{Int64}}, Arrow.ToStruct{Tuple{Int64, Vararg{Int64}}, 1, ArrowTypes.ToArrow{Tuple{Tuple{Int64, Vararg{Int64}}, Tuple{Vararg{Int64}}, Tuple{}, Tuple{}}, Vector{Tuple{Tuple{Int64, Vararg{Int64}}, Tuple{Vararg{Int64}}, Tuple{}, Tuple{}}}}}}, i::Int64, nl::Int64, fi::Int64, de::Dict{Int64, Any}, ded::Vector{Arrow.DictEncoding}, meta::Base.ImmutableDict{String, String}; kw::Base.Pairs{Symbol, Union{Nothing, Integer}, NTuple{6, Symbol}, NamedTuple{(:dictencode, :maxdepth, :compression, :largelists, :denseunions, :dictencodenested), Tuple{Bool, Int64, Nothing, Bool, Bool, Bool}}})
@ Arrow C:\Users\rNr\.julia\packages\Arrow\x6smw\src\arraytypes\struct.jl:93
(plus many many more lines of traceback).
But each of the following do work:
df = DataFrame(col = [x])
,
df = DataFrame(col = [y])
,
and
using Arrow, DataFrames
x = [[1,], [1,], [], []];
y = [[1, 2], [], [], []];
df = DataFrame(col = [x, y]);
Arrow.write("test.arrow", df)
Is this the intended behavior? Why would arrays work but tuples not?