-
Notifications
You must be signed in to change notification settings - Fork 25
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
TypedTables.Table as a sink #73
Comments
I'm a dummy. julia> t2 = copy!(f, similar(t, 0), t)
Table with 2 columns and 4 rows:
a b
┌─────────────
1 │ 12 0.899638
2 │ 96 1.48997
3 │ 84 1.96983
4 │ 82 0.385463 |
Would it be worthwhile to define |
BTW, I think foldl(push!!, xf, input_table; init=Table()) should work. But |
I was playing around with using Transducers with TypedTables.jl. It works relatively well out of the box:
The one problem I see here is calling
collect
before theTable
constructor causes unnecessary copying (creates aVector{NamedTuple{(:a, :b),Tuple{Int64,Float64}}}
which then has to be converted to aNamedTuple{(:a, :b),Tuple{Vector{Int64},Vector{Float64}}}
). Usingcollect
only works becauseTables.jl
defines aVector{T} where {T<:NamedTuple}
as a table.Any ideas for making
Transducer
s more general in this way to avoid unnecessary copying?The text was updated successfully, but these errors were encountered: