Dandandan commented on code in PR #3404:
URL: https://github.com/apache/arrow-datafusion/pull/3404#discussion_r966411692


##########
datafusion/optimizer/src/simplify_expressions.rs:
##########
@@ -803,6 +801,26 @@ impl<'a, S: SimplifyInfo> ExprRewriter for Simplifier<'a, 
S> {
                 out_expr.rewrite(self)?
             }
 
+            //
+            // Rules for Between
+            //
+
+            // a between 3 and 5  -->  a >= 3 AND a <=5
+            // a not between 3 and 5  -->  a < 3 OR a > 5
+            Between {
+                expr,
+                low,
+                high,
+                negated,
+            } => match negated {

Review Comment:
   Could use `if` instead of `match`



-- 
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]

Reply via email to