alamb commented on issue #8319: URL: https://github.com/apache/arrow-rs/issues/8319#issuecomment-3285991955
> 1/ is probably the most intuitive way for users to track variant columns in their schemas and data. I agree and in my mind this is what @kylebarron has done in geoarrow > Inside a shredded variant, the typed_value field of a (partially) shredded variant object field is annotated as parquet.variant.shredded-object-field and the typed_value field of a shredded variant array element is annotated as parquet.variant.shredded-array-element. I am not quite sure about this > For example, cast_to_variant takes &dyn Array as input, and would be incurably vulnerable to a user who passes a variant column (either accidentally, or intentionally hoping to unshred it). Another possible approach here is some new trait or enum, something like ```rust enum VariantOrArray { // result is a variant array VariantArray(VariantArray), // result is some other arrow type Array(ArrayRef) } I have to think more carefully about what `cast_to_variant` is doing > This probably needs some pathfinding... Yes, I will do so. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org