Skip to content

Commit

Permalink
fix: is not false crash (#3298)
Browse files Browse the repository at this point in the history
Co-authored-by: Will Jones <[email protected]>
  • Loading branch information
chenkovsky and wjones127 authored Dec 31, 2024
1 parent 11f6e26 commit 7363a53
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions python/python/tests/test_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def test_sql_predicates(dataset):
("str = 'aa'", 16),
("str in ('aa', 'bb')", 26),
("rec.bool", 50),
("rec.bool is true", 50),
("rec.bool is not true", 50),
("rec.bool is false", 50),
("rec.bool is not false", 50),
("rec.date = cast('2021-01-01' as date)", 1),
("rec.dt = cast('2021-01-01 00:00:00' as timestamp(6))", 1),
("rec.dt = cast('2021-01-01 00:00:00' as timestamp)", 1),
Expand Down
2 changes: 1 addition & 1 deletion rust/lance-datafusion/src/planner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ impl Planner {
}))
}
SQLExpr::IsFalse(expr) => Ok(Expr::IsFalse(Box::new(self.parse_sql_expr(expr)?))),
SQLExpr::IsNotFalse(_) => Ok(Expr::IsNotFalse(Box::new(self.parse_sql_expr(expr)?))),
SQLExpr::IsNotFalse(expr) => Ok(Expr::IsNotFalse(Box::new(self.parse_sql_expr(expr)?))),
SQLExpr::IsTrue(expr) => Ok(Expr::IsTrue(Box::new(self.parse_sql_expr(expr)?))),
SQLExpr::IsNotTrue(expr) => Ok(Expr::IsNotTrue(Box::new(self.parse_sql_expr(expr)?))),
SQLExpr::IsNull(expr) => Ok(Expr::IsNull(Box::new(self.parse_sql_expr(expr)?))),
Expand Down

0 comments on commit 7363a53

Please sign in to comment.