Skip to content

Commit

Permalink
replace and(.., not(...)) with and_not(..) (apache#10885)
Browse files Browse the repository at this point in the history
Co-authored-by: velosearch <rt_enzyme@163.com>
  • Loading branch information
RTEnzyme and Velosearch authored Jun 12, 2024
1 parent 97ea05c commit 9b3b805
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datafusion/physical-expr/src/expressions/case.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -168,7 +168,7 @@ impl CaseExpr {
}
};

remainder = and(&remainder, &not(&when_match)?)?;
remainder = and_not(&remainder, &when_match)?;
}

if let Some(e) = &self.else_expr {
Expand Down Expand Up @@ -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, &not(&when_value)?)?;
remainder = and_not(&remainder, &when_value)?;
}

if let Some(e) = &self.else_expr {
Expand Down

0 comments on commit 9b3b805

Please sign in to comment.