From 64471555efb93d09d7ab75d97bae6f18820b7edd Mon Sep 17 00:00:00 2001 From: velosearch Date: Wed, 12 Jun 2024 11:24:06 +0800 Subject: [PATCH] replace and(.., not(...)) with and_not(..) --- datafusion/physical-expr/src/expressions/case.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datafusion/physical-expr/src/expressions/case.rs b/datafusion/physical-expr/src/expressions/case.rs index c56229e07a63..08d8cd441334 100644 --- a/datafusion/physical-expr/src/expressions/case.rs +++ b/datafusion/physical-expr/src/expressions/case.rs @@ -26,7 +26,7 @@ use crate::PhysicalExpr; use arrow::array::*; use arrow::compute::kernels::cmp::eq; use arrow::compute::kernels::zip::zip; -use arrow::compute::{and, is_null, not, nullif, or, prep_null_mask_filter}; +use arrow::compute::{and, and_not, is_null, not, nullif, or, prep_null_mask_filter}; use arrow::datatypes::{DataType, Schema}; use datafusion_common::cast::as_boolean_array; use datafusion_common::{exec_err, internal_err, DataFusionError, Result, ScalarValue}; @@ -168,7 +168,7 @@ impl CaseExpr { } }; - remainder = and(&remainder, ¬(&when_match)?)?; + remainder = and_not(&remainder, &when_match)?; } if let Some(e) = &self.else_expr { @@ -241,7 +241,7 @@ impl CaseExpr { // Succeed tuples should be filtered out for short-circuit evaluation, // null values for the current when expr should be kept - remainder = and(&remainder, ¬(&when_value)?)?; + remainder = and_not(&remainder, &when_value)?; } if let Some(e) = &self.else_expr {