alamb commented on a change in pull request #1163:
URL: https://github.com/apache/arrow-datafusion/pull/1163#discussion_r753667139



##########
File path: datafusion/src/physical_plan/expressions/binary.rs
##########
@@ -49,6 +53,62 @@ use super::coercion::{
     eq_coercion, like_coercion, numerical_coercion, order_coercion, 
string_coercion,
 };
 
+// Simple (low performance) kernels until optimized kernels are added to arrow
+// TODO: file arrow-rs ticket to track this feature
+
+fn is_distinct_from_bool(
+    left: &BooleanArray,
+    right: &BooleanArray,
+) -> Result<BooleanArray> {
+    // Different from `eq` beacause not eq_bool because null == null
+    Ok(left
+        .iter()
+        .zip(right.iter())
+        .map(|(left, right)| Some(left != right))
+        .collect())
+}
+
+fn is_not_distinct_from_bool(
+    left: &BooleanArray,
+    right: &BooleanArray,
+) -> Result<BooleanArray> {
+    Ok(left
+        .iter()
+        .zip(right.iter())
+        .map(|(left, right)| Some(left == right))
+        .collect())
+}
+
+#[allow(clippy::bool_comparison)]

Review comment:
       ```suggestion
   // TODO use arrow-rs kernels when available. See
   // https://github.com/apache/arrow-rs/issues/959
   #[allow(clippy::bool_comparison)]
   ```




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