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


##########
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:
   Actually I implemented that way in [an earlier 
version](https://github.com/apache/arrow-rs/commit/5c9c004443c8244614111160c2f579245b15fa75),
 but then realized that it might be counterproductive and excessively 
memory-intensive if the number of rows per input array is very low (as in my 
use case). 
[`equal_dense`](https://github.com/apache/arrow-rs/blob/95683439fa4108c036e48b334f8bed898b87a9b9/arrow-data/src/equal/union.rs#L41-L50)
 is implemented in the naïve way as well.



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