Skip to content
Permalink
Browse files
Update arrowjson.jl usage of Tables.Columns
  • Loading branch information
quinnj committed Oct 3, 2021
1 parent f136d7d commit ffcdf946b2818120f8d85b17495a1591823e8018
Showing 1 changed file with 3 additions and 3 deletions.
@@ -559,10 +559,10 @@ function DataFile(source)
dictencodings = Dict{String, Tuple{Base.Type, DictEncoding}}()
dictid = Ref(0)
for (i, tbl1) in Tables.partitions(source)
tbl = Arrow.toarrowtable(Table.columns(tbl1))
tbl = Arrow.toarrowtable(Table.Columns(tbl1))
if i == 1
sch = Tables.schema(tbl)
for (nm, T, col) in zip(sch.names, sch.types, Tables.Columns(tbl))
for (nm, T, col) in zip(sch.names, sch.types, tbl)
if col isa Arrow.DictEncode
id = dictid[]
dictid[] += 1
@@ -580,7 +580,7 @@ function DataFile(source)
# build record batch
len = Tables.rowcount(tbl)
columns = FieldData[]
for (nm, T, col) in zip(sch.names, sch.types, Tables.Columns(tbl))
for (nm, T, col) in zip(sch.names, sch.types, tbl)
push!(columns, FieldData(String(nm), T, col, dictencodings))
end
push!(batches, RecordBatch(len, columns))

0 comments on commit ffcdf94

Please sign in to comment.