andygrove commented on a change in pull request #8815:
URL: https://github.com/apache/arrow/pull/8815#discussion_r534392353
##########
File path: rust/datafusion/src/sql/planner.rs
##########
@@ -638,10 +638,16 @@ impl<'a, S: SchemaProvider> SqlToRel<'a, S> {
Ok(Expr::IsNotNull(Box::new(self.sql_to_rex(expr, schema)?)))
}
- SQLExpr::UnaryOp { ref op, ref expr } => match *op {
- UnaryOperator::Not => {
+ SQLExpr::UnaryOp { ref op, ref expr } => match (op, &**expr) {
Review comment:
This can be simplified as `match (op, expr.as_ref())`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]