Skip to content

Commit dc9e9f4

Browse files
committed
Refactor reapply for Colwise
1 parent f44268e commit dc9e9f4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/transforms.jl

+3-6
Original file line numberDiff line numberDiff line change
@@ -199,20 +199,17 @@ function reapply(transform::Colwise, table, cache)
199199
c = cache[i]
200200
x = Tables.getcolumn(cols, n)
201201
y = colapply(transform, x, c)
202-
(n => y), c
202+
n => y
203203
end
204204

205205
# parallel map with multiple threads
206206
vals = foldxt(vcat, Map(colfunc), 1:length(names))
207207

208208
# new table with transformed columns
209-
𝒯 = (; first.(vals)...) |> Tables.materializer(table)
210-
211-
# cache values for each column
212-
𝒞 = last.(vals)
209+
newtable = (; vals...) |> Tables.materializer(table)
213210

214211
# return new table and cache
215-
𝒯, 𝒞
212+
newtable, cache
216213
end
217214

218215
# ----------------

0 commit comments

Comments
 (0)