Skip to content

Commit 5ae261c

Browse files
committed
map: Use tabletype
1 parent 90d4173 commit 5ae261c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/operations/operations.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ julia> fetch(m)
2424
```
2525
"""
2626
function map(f, d::DTable)
27-
chunk_wrap = (_chunk, _f) -> begin
27+
chunk_wrap = (_chunk, _f, tabletype) -> begin
2828
return if isnonempty(_chunk)
29-
sink = materializer(_chunk)
29+
sink = materializer(tabletype === nothing ? _chunk : tabletype())
3030
sink(TableOperations.map(_f, _chunk))
3131
else
3232
_chunk
3333
end
3434
end
35-
chunks = map(c -> Dagger.spawn(chunk_wrap, c, f), d.chunks)
35+
chunks = map(c -> Dagger.spawn(chunk_wrap, c, f, d.tabletype), d.chunks)
3636
return DTable(chunks, d.tabletype)
3737
end
3838

0 commit comments

Comments
 (0)