in src/eltypes.jl [551:569]
function arrowtype(
b,
x::Union{DenseUnion{S,UnionT{T,typeIds,U}},SparseUnion{S,UnionT{T,typeIds,U}}},
) where {S,T,typeIds,U}
if typeIds !== nothing
Meta.unionStartTypeIdsVector(b, length(typeIds))
for id in Iterators.reverse(typeIds)
FlatBuffers.prepend!(b, id)
end
TI = FlatBuffers.endvector!(b, length(typeIds))
end
children = [fieldoffset(b, "", x.data[i]) for i = 1:fieldcount(U)]
Meta.unionStart(b)
Meta.unionAddMode(b, T)
if typeIds !== nothing
Meta.unionAddTypeIds(b, TI)
end
return Meta.Union, Meta.unionEnd(b), children
end