liamzwbao opened a new issue, #8795: URL: https://github.com/apache/arrow-rs/issues/8795
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] (This section helps Arrow developers understand the context and *why* for this feature, in addition to the *what*) --> We currently have two APIs, `variant_get` and `shred_variant`, that share code paths in `variant_to_arrow`. - `variant_get`: cast a `Variant` to **any** valid Arrow data type. - `shred_variant`: convert a `Variant` only to **valid shredded value types** per the [Parquet Variant Shredding spec](https://github.com/apache/parquet-format/blob/master/VariantShredding.md#shredded-value-types). Right now these responsibilities blur together. This makes the API confusing and may let `shred_variant` accept types it shouldn’t. **Describe the solution you'd like** <!-- A clear and concise description of what you want to happen. --> - Add checks in `shred_variant` to allow only spec-approved shredded types. - Keep `variant_to_arrow` simple, it should only convert Variant → Arrow. No shredding-specific rules. **Describe alternatives you've considered** <!-- A clear and concise description of any alternative solutions or features you've considered. --> 2 separate builders for the 2 APIs **Additional context** <!-- Add any other context or screenshots about the feature request here. --> Found while reviewing #8768 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
