You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Variant] Configure explicit shredding when writing Parquet #11950
Is your feature request related to a problem or challenge?
Applications such as datafusion-variant want to select a physical layout for Variant columns when writing Parquet—for example, shredding event.service as Utf8 and event.status as Int64.
This is already possible by calling shred_variant, constructing a RecordBatch with the resulting storage arrays and Variant fields, and passing it to ArrowWriter. Each application must coordinate the transformation, output schema, and metadata itself. Writer-level configuration or a reusable writer adapter would make this easier.
Describe the solution you'd like
Provide a way to associate an explicit shredding schema with a Variant column and write batches containing the original Variant arrays. For example, the caller could supply a logical target DataType built with ShreddedSchemaBuilder; the exact API is open for discussion.
The integration should reuse the existing shredding kernels, derive the corresponding output schema and Variant metadata, and use the selected layout consistently across batches in a file. Unselected fields and incompatible values should remain in the residual Variant data, preserving logical values and null semantics.
Keep the current behavior when no configuration is supplied. Define the policy for already-shredded input, since shred_variant currently rejects it; changing layouts may require unshred_variant first.
Automatic schema selection from sampled data is separate work.
Activity