tustvold commented on code in PR #2666:
URL: https://github.com/apache/arrow-rs/pull/2666#discussion_r963703871
##########
arrow/src/compute/kernels/arity.rs:
##########
@@ -17,39 +17,62 @@
//! Defines kernels suitable to perform operations to primitive arrays.
-use crate::array::{Array, ArrayData, ArrayRef, DictionaryArray,
PrimitiveArray};
+use crate::array::{
+ Array, ArrayData, ArrayRef, BufferBuilder, DictionaryArray, PrimitiveArray,
+};
use crate::buffer::Buffer;
+use crate::compute::util::combine_option_bitmap;
use crate::datatypes::{
ArrowNumericType, ArrowPrimitiveType, DataType, Int16Type, Int32Type,
Int64Type,
Int8Type, UInt16Type, UInt32Type, UInt64Type, UInt8Type,
};
use crate::error::{ArrowError, Result};
+use crate::util::bit_iterator::{BitIndexIterator, BitSliceIterator};
use std::sync::Arc;
+fn try_for_each_valid<F: FnMut(usize) -> Result<()>>(
Review Comment:
This internal iteration style optimises much better than the external style
when there are multiple variants, I may create a `HybridBitIndexIterator` that
special cases `for_each` and `try_fold` :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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]