in src/table.jl [710:744]
function build(field::Meta.Field, batch, rb, de, nodeidx, bufferidx, varbufferidx, convert)
d = field.dictionary
if d !== nothing
validity = buildbitmap(batch, rb, nodeidx, bufferidx)
bufferidx += 1
buffer = rb.buffers[bufferidx]
S = d.indexType === nothing ? Int32 : juliaeltype(field, d.indexType, false)
bytes, indices = reinterp(S, batch, buffer, rb.compression)
@lock de begin
encoding = de[][d.id]
A = DictEncoded(
bytes,
validity,
indices,
encoding,
buildmetadata(field.custom_metadata),
)
end
nodeidx += 1
bufferidx += 1
else
A, nodeidx, bufferidx, varbufferidx = build(
field,
field.type,
batch,
rb,
de,
nodeidx,
bufferidx,
varbufferidx,
convert,
)
end
return A, nodeidx, bufferidx, varbufferidx
end