tustvold commented on code in PR #4598:
URL: https://github.com/apache/arrow-rs/pull/4598#discussion_r1278965829


##########
arrow-data/src/transform/union.rs:
##########
@@ -48,14 +51,18 @@ pub(super) fn build_extend_dense(array: &ArrayData) -> 
Extend {
                 .extend_from_slice(&type_ids[start..start + len]);
 
             (start..start + len).for_each(|i| {
-                let type_id = type_ids[i] as usize;
+                let type_id = type_ids[i];
+                let child_index = src_fields

Review Comment:
   Perhaps we could follow the approach used by UnionArray and compute this 
mapping once
   
   
https://github.com/apache/arrow-rs/blob/master/arrow-array/src/array/union_array.rs#L345
   
   



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