Skip to content

Commit 3dbe4a8

Browse files
authored
Feat: add bind_is_null (#92)
feat: add bind_is_null
1 parent 5f498c0 commit 3dbe4a8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/binder/expr.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ impl<'a, T: Transaction> Binder<'a, T> {
2525
Expr::Function(func) => self.bind_agg_call(func),
2626
Expr::Nested(expr) => self.bind_expr(expr),
2727
Expr::UnaryOp { expr, op } => self.bind_unary_op_internal(expr, op),
28+
Expr::IsNull(expr) => self.bind_is_null(expr),
2829
_ => {
2930
todo!()
3031
}
@@ -198,6 +199,12 @@ impl<'a, T: Transaction> Binder<'a, T> {
198199
})
199200
}
200201

202+
fn bind_is_null(&mut self, expr: &Expr) -> Result<ScalarExpression, BindError> {
203+
Ok(ScalarExpression::IsNull {
204+
expr: Box::new(self.bind_expr(expr)?),
205+
})
206+
}
207+
201208
fn wildcard_expr() -> ScalarExpression {
202209
ScalarExpression::Constant(Arc::new(DataValue::Utf8(Some("*".to_string()))))
203210
}

0 commit comments

Comments
 (0)