Coder Social home page Coder Social logo

Comments (2)

jrevels avatar jrevels commented on July 28, 2024

Seems like we get a decent error rather than a crash if we use Type instead:

julia> Arrow.write(io, (types = Type[Int64, Float64],))
ERROR: ArgumentError: type does not have a definite number of fields
Stacktrace:
 [1] fieldcount(::Any) at ./reflection.jl:722
 [2] arrowvector(::Arrow.ArrowTypes.StructType, ::Array{Type,1}, ::Int64, ::Int64, ::Int64, ::Dict{Int64,Any}, ::Array{Arrow.DictEncoding,1}, ::Nothing; kw::Base.Iterators.Pairs{Symbol,Union{Nothing, Bool},NTuple{5,Symbol},NamedTuple{(:dictencode, :compression, :largelists, :denseunions, :dictencodenested),Tuple{Bool,Nothing,Bool,Bool,Bool}}}) at /Users/jarrettrevels/.julia/dev/Arrow/src/arraytypes/struct.jl:89
 [3] arrowvector(::Type{Type}, ::Array{Type,1}, ::Int64, ::Int64, ::Int64, ::Dict{Int64,Any}, ::Array{Arrow.DictEncoding,1}, ::Nothing; kw::Base.Iterators.Pairs{Symbol,Union{Nothing, Bool},NTuple{5,Symbol},NamedTuple{(:dictencode, :compression, :largelists, :denseunions, :dictencodenested),Tuple{Bool,Nothing,Bool,Bool,Bool}}}) at /Users/jarrettrevels/.julia/dev/Arrow/src/arraytypes/arraytypes.jl:78
 [4] arrowvector(::Array{Type,1}, ::Int64, ::Int64, ::Int64, ::Dict{Int64,Any}, ::Array{Arrow.DictEncoding,1}, ::Nothing; dictencoding::Bool, dictencode::Bool, kw::Base.Iterators.Pairs{Symbol,Union{Nothing, Bool},NTuple{4,Symbol},NamedTuple{(:compression, :largelists, :denseunions, :dictencodenested),Tuple{Nothing,Bool,Bool,Bool}}}) at /Users/jarrettrevels/.julia/dev/Arrow/src/arraytypes/arraytypes.jl:52
 [5] toarrowvector(::Array{Type,1}, ::Int64, ::Dict{Int64,Any}, ::Array{Arrow.DictEncoding,1}, ::Nothing; compression::Nothing, kw::Base.Iterators.Pairs{Symbol,Bool,NTuple{4,Symbol},NamedTuple{(:largelists, :denseunions, :dictencode, :dictencodenested),NTuple{4,Bool}}}) at /Users/jarrettrevels/.julia/dev/Arrow/src/arraytypes/arraytypes.jl:36
 [6] (::Arrow.var"#113#114"{Dict{Int64,Any},Bool,Nothing,Bool,Bool,Bool,Array{Any,1},Array{Type,1},Array{Arrow.DictEncoding,1}})(::Array{Type,1}, ::Int64, ::Symbol) at /Users/jarrettrevels/.julia/dev/Arrow/src/write.jl:202
 [7] eachcolumn at /Users/jarrettrevels/.julia/packages/Tables/iG2a3/src/utils.jl:70 [inlined]
 [8] toarrowtable(::NamedTuple{(:types,),Tuple{Array{Type,1}}}, ::Dict{Int64,Any}, ::Bool, ::Nothing, ::Bool, ::Bool, ::Bool) at /Users/jarrettrevels/.julia/dev/Arrow/src/write.jl:201
 [9] macro expansion at /Users/jarrettrevels/.julia/dev/Arrow/src/write.jl:111 [inlined]
 [10] macro expansion at ./task.jl:332 [inlined]
 [11] write(::Base.GenericIOBuffer{Array{UInt8,1}}, ::NamedTuple{(:types,),Tuple{Array{Type,1}}}, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Bool, ::Int64) at /Users/jarrettrevels/.julia/dev/Arrow/src/write.jl:108
 [12] #write#106 at /Users/jarrettrevels/.julia/dev/Arrow/src/write.jl:83 [inlined]
 [13] write(::Base.GenericIOBuffer{Array{UInt8,1}}, ::NamedTuple{(:types,),Tuple{Array{Type,1}}}) at /Users/jarrettrevels/.julia/dev/Arrow/src/write.jl:83
 [14] top-level scope at REPL[6]:1

from arrow-julia.

quinnj avatar quinnj commented on July 28, 2024

On #156, we'll now throw the error

from arrow-julia.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.