pub fn flatten_record_batch(batch: &RecordBatch) -> Result<RecordBatch>Expand description
Flattens all Struct columns in a RecordBatch into top-level columns,
dot-joining names as it recurses.
Struct(a, b)with namefoo→ columnsfoo.a,foo.bFixedSizeList(n, Struct(...))with namefoo→ columnsfoo.0,foo.1, …foo.n-1, each further expanded if the struct has fieldsList(Struct(...))with namefoo→ singlefoocolumn serialised to UTF-8 string- Any other type is emitted unchanged
When two expanded names collide the second occurrence is renamed name_1, the third
name_2, and so on (the first occurrence keeps its original name).