Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: is not false crash #3298

Merged
merged 2 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading