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


##########
arrow-select/src/coalesce.rs:
##########
@@ -809,6 +930,26 @@ trait InProgressArray: std::fmt::Debug + Send + Sync {
         }
     }
 
+    /// Copy rows at `indices` from `source` into the in-progress array.
+    /// `indices` must already be bounds-checked against `source`.
+    fn copy_rows_by_indices(
+        &mut self,
+        source: &ArrayRef,
+        indices: &[u32],

Review Comment:
   >copy_rows_by_indices is a safe method, but the primitive and byte-view 
impls read through indices with unchecked pointer arithmetic. A caller that 
skips validate_indices_bounds gets undefined behavior rather than an error.
   
   these traits and methods are private so users cant call this code 
arbitrarily. their respective conditions are outlined as safety comments for 
both  `primitve` and `View` types. I think this method should remain safe



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