Dandandan commented on a change in pull request #844: URL: https://github.com/apache/arrow-rs/pull/844#discussion_r734403154
########## File path: arrow/src/compute/kernels/comparison.rs ########## @@ -623,6 +624,107 @@ pub fn eq_utf8_scalar<OffsetSize: StringOffsetSizeTrait>( compare_op_scalar!(left, right, |a, b| a == b) } +/// Perform `left == right` operation on [`BooleanArray`] +fn eq_bool(left: &BooleanArray, right: &BooleanArray) -> Result<BooleanArray> { + binary_boolean_kernel( + left, + right, + |left: &Buffer, + left_offset_in_bits: usize, + right: &Buffer, + right_offset_in_bits: usize, + len_in_bits: usize| { + bitwise_bin_op_helper( + left, + left_offset_in_bits, + right, + right_offset_in_bits, + len_in_bits, + |a, b| !(a ^ b), + ) + }, + ) +} + +/// Perform `left != right` operation on [`BooleanArray`] +fn neq_bool(left: &BooleanArray, right: &BooleanArray) -> Result<BooleanArray> { + binary_boolean_kernel( + left, + right, + |left: &Buffer, + left_offset_in_bits: usize, + right: &Buffer, + right_offset_in_bits: usize, + len_in_bits: usize| { + bitwise_bin_op_helper( Review comment: That only should be used together with a `simd` feature / implementation. Certainly possible, but could be implemented as follow up work. -- 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