Rich-T-kid commented on code in PR #12306:
URL: https://github.com/apache/arrow-rs/pull/12306#discussion_r4610411861


##########
arrow-select/src/coalesce/dictionary.rs:
##########
@@ -205,6 +209,64 @@ impl<K: ArrowDictionaryKeyType> InProgressArray for 
InProgressDictionaryArray<K>
         Ok(())
     }
 
+    unsafe fn copy_rows_by_indices(
+        &mut self,
+        source: &ArrayRef,
+        indices: &UInt32Array,
+    ) -> Result<(), ArrowError> {
+        if indices.is_empty() {
+            return Ok(());
+        }
+        if indices.len() > source.len() / 
INDEXED_COPY_MAX_SELECTIVITY_DENOMINATOR {
+            let taken = take(
+                source.as_ref(),
+                indices,
+                Some(TakeOptions { check_bounds: true }),

Review Comment:
   could/should skip the bounds check since the function is already unsafe



##########
arrow-select/src/coalesce/dictionary.rs:
##########
@@ -309,6 +371,30 @@ mod tests {
         assert!(Arc::ptr_eq(output.values(), &values));
     }
 
+    #[test]
+    fn indexed_copy_reuses_values_and_preserves_sliced_null_keys() {

Review Comment:
   could add another test



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