Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Huaijin <[email protected]>
  • Loading branch information
my-vegetable-has-exploded and haohuaijin authored Dec 27, 2023
1 parent a14a827 commit 9baab8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datafusion/physical-expr/src/utils/guarantee.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ impl LiteralGuarantee {
// if all terms are 'col <op> literal' with the same column
// and operation we can infer any guarantees
//
// For those like (a != bar OR a != baz).
// For those like (a != foo AND (a != bar OR a != baz)).
// We can't combine the (a != bar OR a != baz) part, but
// it also doesn't invalidate our knowledge that a !=
// foo is required for the expression to be true.
// So we can only create a multi guarantee for `=`
// So we can only create a multi value guarantee for `=`
// (or a single value). (e.g. ignore `a != foo OR a != bar`)
let first_term = &terms[0];
if terms.iter().all(|term| {
Expand Down Expand Up @@ -773,7 +773,7 @@ mod test {
.and(col("b").eq(lit(4)).or(col("b").eq(lit(5)))),
vec![],
);
// b not in (1, 2, 3) AND (b = 3 OR b = 4)
// b NOT IN (1, 2, 3) AND (b = 3 OR b = 4)
test_analyze(
col("b")
.in_list(vec![lit(1), lit(2), lit(3)], true)
Expand Down

0 comments on commit 9baab8d

Please sign in to comment.