-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
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)
]
endMaybe a simple stopgap until Tables.jl integration.
Metadata
Metadata
Assignees
Labels
No labels