Skip to content
Permalink
Browse files
Compat for tables
  • Loading branch information
quinnj committed Oct 3, 2020
1 parent 6052a46 commit f33ed076bba74f13b4a23cbb9954cfff0a368a79
Showing 1 changed file with 7 additions and 1 deletion.
@@ -25,6 +25,12 @@ function write(io::IO, tbl; debug::Bool=false)
return write(io, tbl, false, debug)
end

if isdefined(Tables, :partitions)
parts = Tables.partitions
else
parts = x -> (x,)
end

function write(io, source, writetofile, debug)
if writetofile
Base.write(io, "ARROW1\0\0")
@@ -38,7 +44,7 @@ function write(io, source, writetofile, debug)
tsk = Threads.@spawn for msg in msgs
Base.write(io, msg)
end
@sync for (i, tbl) in enumerate(Tables.partitions(source))
@sync for (i, tbl) in enumerate(parts(source))
if i == 1
cols = Tables.columns(tbl)
sch[] = Tables.schema(cols)

0 comments on commit f33ed07

Please sign in to comment.