alamb opened a new issue, #8152:
URL: https://github.com/apache/arrow-rs/issues/8152

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   - part of https://github.com/apache/arrow-rs/issues/6736
   
   - As part of implementing shredded variants in `variant_get` 
https://github.com/apache/arrow-rs/issues/8083 there are cases where the code 
needs to assemble a Variant whose metadata is already known and can not be 
changed
   
   For example, when "shredding" a variant object, a new variant object is made 
with fields that are successfully shredded totally removed. The output variant 
object has the same metadata as the input variant (and can't change) but needs 
to have different actual fields.
   
   The existing `VariantBuilder` / `MetadataBuilder` allows new fields to be 
added (and thus change the Metadata), so it is not directly applicable
   
   
   **Describe the solution you'd like**
   
   A way to build variants with a pre-existing, read only, metadata. If a field 
is added to the the in progress object that is not present in the original 
metadata, then an error / panic should be raised. 
   
   **Describe alternatives you've considered**
   @scovich has one proposal here (basically make MetadataBuilder a trait):
   - https://github.com/apache/arrow-rs/pull/7915
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to