You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like using StructArrays.jl for data manipulation. Converting a StructVector to a NamedTuple is basically free because of how StructArray is implemented. There are a number of Tables.jl types that work like this.
I wonder if we could relax the data input type annotation on dict2columns? This would allow us to insert iterators of anything that validly implements Base.keys and Base.pairs (e.g. NamedTuple).
I tried this change to src/Query.jl and it doesn't break any existing test cases:
function dict2columns(
- dict::Dict{Symbol, T} where T,+ dict,
valid_columns::Dict{Symbol, String},
)::Vector{Column}
...
[
Column(string(name), valid_columns[name], column)
- for (name, column) ∈ dict+ for (name, column) ∈ pairs(dict)
]
end
Maybe a simple stopgap until Tables.jl integration.
The text was updated successfully, but these errors were encountered:
I like using StructArrays.jl for data manipulation. Converting a
StructVector
to aNamedTuple
is basically free because of howStructArray
is implemented. There are a number of Tables.jl types that work like this.I wonder if we could relax the data input type annotation on
dict2columns
? This would allow us to insert iterators of anything that validly implementsBase.keys
andBase.pairs
(e.g.NamedTuple
).I tried this change to
src/Query.jl
and it doesn't break any existing test cases:Maybe a simple stopgap until Tables.jl integration.
The text was updated successfully, but these errors were encountered: