JuliaDB.jl
JuliaDB.jl copied to clipboard
map(f,x::DNDSparse) produces wrong parametric type if f changes value type
A = ndsparse((numid=1:10,), (a=1:10,b=1:10); chunks=2)
B = map(v->v.a+1,A)
seems to work, but assigns wrong type parameter typeof(B)
JuliaDB.DNDSparse{NamedTuple{(:numid,),Tuple{Int64}},NamedTuple{(:a, :b),Tuple{Int64,Int64}}}
which makes
C = filter(isodd, B)
fail with
ERROR: column a not found.
I investigated a bit and think the minor fix in pull request #316 suffices.
typeof(B) in the example is now
JuliaDB.DNDSparse{NamedTuple{(:numid,),Tuple{Int64}},Int64}