tustvold commented on a change in pull request #1225: URL: https://github.com/apache/arrow-rs/pull/1225#discussion_r790329198
########## 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: > no-op function ( Box::new(|_, _, _| {}) ) if use_nulls is false and the array doesn't have a null bitmap This is a good point, the particular case the filter benchmarks hit is where the array has a null bitmap, but a zero null count. So an alternative fix might be to fix `extend_null_bits`. Although now that I think about it, I'm not sure that no-op function is correct in the event of mixed array nullability :thinking: -- 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