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

   # Which issue does this PR close?
   
   Closes #5613.
   
   # Rationale for this change
    
   It came up in #5585 that the `UnionArray` constructors are a bit odd when 
compared to the other array constructors.
   
   # What changes are included in this PR?
   
   ## `UnionArray::try_new` and `UnionArray::new_unchecked`
   
   Changed arguments:
   From: `field_type_ids: &[i8], type_ids: Buffer, value_offsets: 
Option<Buffer>, child_arrays: Vec<(Field, ArrayRef)>`
   To: `fields: UnionFields, type_ids: ScalarBuffer<i8>, offsets: 
Option<ScalarBuffer<i32>>, children: Vec<ArrayRef>`.
   
   The order of `children` arrays must match the order of fields in the 
`UnionFields`.
   
   The validation in `try_new` is a bit more strict.
   
   ## `UnionBuilder`
   
   It now uses a `BTreeMap` instead of a `HashMap` internally to get sorted 
iteration.
   
   # Are there any user-facing changes?
   
   This is a breaking change that changes the `UnionArray` constructors.


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