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
innerjoin gives odd result with missing values #34
Comments
Thanks for exploring :) Yeah... so the first problem would probably be somehow related to inference. The implementation get's the eltype via The second part should maybe be addressed in Tables.jl? @quinnj what do you suppose we should do about the case that |
Wow... this typed code is more messed up than I thought.... julia> nt1 = customers[1]
(id = 1, name = "Alice", address = "12 Beach Street")
julia> nt2 = orders[1]
NamedTuple{(:customer_id, :items),Tuple{Int64,Union{Missing, String}}}((2, "Socks"))
julia> merge(nt1, nt2)
NamedTuple{(:id, :name, :address, :customer_id, :items),Tuple{Int64,String,String,Int64,Union{Missing, String}}}((1, "Alice", "12 Beach Street", 2, "Socks"))
julia> @code_typed merge(nt1, nt2)
CodeInfo(
228 1 ─ %1 = (Base.getfield)(a, :id)::Int64 │╻ macro expansion
│ %2 = (Base.getfield)(a, :name)::String ││
│ %3 = (Base.getfield)(a, :address)::String ││
│ %4 = (Base.getfield)(b, :customer_id)::Int64 ││
│ %5 = (Base.getfield)(b, :items)::Union{Missing, String} ││
│ %6 = (Core.tuple)(%1, %2, %3, %4, %5)::Tuple{Int64,String,String,Int64,Union{Missing, String}} ││
│ %7 = (NamedTuple{(:id, :name, :address, :customer_id, :items),Tuple{Int64,String,String,Int64,Union{Missing, String}}})(%6)::Any
└── return %7 ││
) => Any We can see my original hypothesis was wrong, The final line is super surprising. The constructor is for a concrete type and the input |
This was raised by Keno only a week ago: JuliaLang/julia#29970 |
Mostly fixes #34. I think I can live with waiting for a proper fix of JuliaLang/julia#29970 for more than 32 columns.
I just started trying out the current incarnation of
TypedTables
for real work, I love it. The tutorial is spot on btw.I ran into the following oddity, if
missing
is added to theinnerjoin
example:No longer a table! What's more, this array of
Any
is not directly convertible to one either. I did the following nasty trick for now.The text was updated successfully, but these errors were encountered: