tustvold commented on a change in pull request #1225:
URL: https://github.com/apache/arrow-rs/pull/1225#discussion_r790327877



##########
File path: arrow/src/array/transform/mod.rs
##########
@@ -608,18 +614,28 @@ impl<'a> MutableArrayData<'a> {
     /// This function panics if the range is out of bounds, i.e. if `start + 
len >= array.len()`.
     pub fn extend(&mut self, index: usize, start: usize, end: usize) {
         let len = end - start;
-        (self.extend_null_bits[index])(&mut self.data, start, len);
+        if !self.extend_null_bits.is_empty() {
+            (self.extend_null_bits[index])(&mut self.data, start, len);

Review comment:
       Yes so if it is true it cannot assume that a bitmask won't be needed due 
to a call to extend_nulls. Otherwise if it is false and the arrays don't 
contain nulls, it knows it doesn't need to compute a null bitmask?
   
   At least that was my reading of it, although the fact you can call 
extend_nulls having specified use_nulls as false and get something other than a 
panic suggests maybe I'm missing something 😅




-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to