Skip to content

Commit

Permalink
fixup! Fix incorrect ... LIKE '%' simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Nov 5, 2024
1 parent aa98a7e commit f4798a1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3633,7 +3633,7 @@ mod tests {

#[test]
fn test_like_and_ilke() {
// test non-null values
// LIKE '%'
let expr = like(col("c1"), "%");
assert_eq!(simplify(expr), if_not_null(col("c1"), true));

Expand All @@ -3646,7 +3646,7 @@ mod tests {
let expr = not_ilike(col("c1"), "%");
assert_eq!(simplify(expr), if_not_null(col("c1"), false));

// test null values
// null_constant LIKE '%'
let null = lit(ScalarValue::Utf8(None));
let expr = like(null.clone(), "%");
assert_eq!(simplify(expr), lit_bool_null());
Expand Down

0 comments on commit f4798a1

Please sign in to comment.