hcrosse commented on code in PR #21288:
URL: https://github.com/apache/datafusion/pull/21288#discussion_r3030568151


##########
datafusion/sql/src/expr/unary_op.rs:
##########
@@ -32,9 +35,37 @@ impl<S: ContextProvider> SqlToRel<'_, S> {
         planner_context: &mut PlannerContext,
     ) -> Result<Expr> {
         match op {
-            UnaryOperator::Not => Ok(Expr::Not(Box::new(
-                self.sql_expr_to_logical_expr(expr, schema, planner_context)?,
-            ))),
+            UnaryOperator::Not => {
+                let operand =
+                    self.sql_expr_to_logical_expr(expr, schema, 
planner_context)?;

Review Comment:
   Thanks for the review! The `+` operator diagnostic was done the same way in 
#15209, do you think we should move all three to the analyzer, or do you want 
me to add a similar check there in addition to what I'm adding here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to