jrevels opened a new issue, #368:
URL: https://github.com/apache/arrow-julia/issues/368

   MWE: 
   
   ```jl
   julia> using Arrow
   
   julia> t = (; x = 
Union{Missing,NamedTuple{(:k,),Tuple{Union{Nothing,String}}}}[missing, (; k = 
"k")])
   (x = Union{Missing, NamedTuple{(:k,), Tuple{Union{Nothing, 
String}}}}[missing, NamedTuple{(:k,), Tuple{Union{Nothing, String}}}(("k",))],)
   
   julia> a = Arrow.Table(Arrow.tobuffer(t))
   ERROR: MethodError: no method matching zero(::Type{Union{Nothing, String}})
   Closest candidates are:
     zero(::Union{Type{P}, P}) where P<:Dates.Period at 
/Applications/Julia-1.8.app/Contents/Resources/julia/share/julia/stdlib/v1.8/Dates/src/periods.jl:53
     zero(::AbstractIrrational) at irrationals.jl:150
     zero(::CartesianIndex{N}) where N at multidimensional.jl:106
     ...
   Stacktrace:
     [1] default(T::Type)
       @ ArrowTypes ~/.julia/packages/ArrowTypes/dkiHE/src/ArrowTypes.jl:305
     [2] getindex
       @ ~/.julia/packages/Arrow/QsQ3U/src/arraytypes/struct.jl:80 [inlined]
     [3] iterate
       @ ./abstractarray.jl:1167 [inlined]
     [4] iterate
       @ ./abstractarray.jl:1165 [inlined]
     [5] iterate
       @ ./iterators.jl:167 [inlined]
     [6] iterate
       @ ./iterators.jl:166 [inlined]
     [7] todense(#unused#::Type{Arrow.UnionT{Arrow.Flatbuf.UnionModes.Dense, 
nothing, Tuple{Nothing, String}}}, x::Arrow.ToStruct{Union{Nothing, String}, 1, 
Vector{Union{Missing, NamedTuple{(:k,), Tuple{Union{Nothing, String}}}}}})
       @ Arrow ~/.julia/packages/Arrow/QsQ3U/src/arraytypes/unions.jl:112
     [8] arrowvector(::ArrowTypes.UnionKind, 
x::Arrow.DenseUnionVector{Arrow.ToStruct{Union{Nothing, String}, 1, 
Vector{Union{Missing, NamedTuple{(:k,), Tuple{Union{Nothing, String}}}}}}, 
Tuple{Nothing, String}}, i::Int64, nl::Int64, fi::Int64, de::Dict{Int64, Any}, 
ded::Vector{Arrow.DictEncoding}, meta::Nothing; kw::Base.Pairs{Symbol, 
Union{Nothing, Integer}, NTuple{6, Symbol}, NamedTuple{(:dictencode, :maxdepth, 
:denseunions, :compression, :largelists, :dictencodenested), Tuple{Bool, Int64, 
Bool, Nothing, Bool, Bool}}})
       @ Arrow ~/.julia/packages/Arrow/QsQ3U/src/arraytypes/unions.jl:219
   ```    
   
   This might be tangential It's a bit confusing to me when a method for 
`default` is actually needed or not; it has a docstring, but it doesn't show up 
in the manual IIRC


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to