Shekharrajak opened a new pull request, #9963:
URL: https://github.com/apache/arrow-rs/pull/9963

   
   
   # Rationale for this change
   
   Adds a builder method that configures VariantArrayBuilder to produce a 
shredded VariantArray at build() time.
   
   # What changes are included in this PR?
   Add shredding_schema: Option<DataType> field to VariantArrayBuilder
   Add with_shredding(as_type: DataType) -> Self — rows are still appended 
unshredded via append_variant; the shredding pass runs once at build() by 
delegating to shred_variant
   
   # Are these changes tested?
   
   unit tests 
   
   # Are there any user-facing changes?
   Yes, usage: 
   ```
   let arr = VariantArrayBuilder::new(3)
       .with_shredding(DataType::Int64)
       .tap(|b| { b.append_variant(Variant::Int64(42)); })
       .build(); // returns shredded VariantArray
   ```


-- 
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]

Reply via email to