optimizer.rs: remove constant folding optimization for NULL since it's incorrect

This commit is contained in:
Jussi Saurio
2025-02-16 11:27:38 +02:00
parent 9bf5b9609f
commit 447f91e5ee

View File

@@ -367,7 +367,6 @@ impl Optimizable for ast::Expr {
fn check_constant(&self) -> Result<Option<ConstantPredicate>> {
match self {
Self::Literal(lit) => match lit {
ast::Literal::Null => Ok(Some(ConstantPredicate::AlwaysFalse)),
ast::Literal::Numeric(b) => {
if let Ok(int_value) = b.parse::<i64>() {
return Ok(Some(if int_value == 0 {