alamb commented on a change in pull request #1719:
URL: https://github.com/apache/arrow-datafusion/pull/1719#discussion_r796051399
##########
File path: datafusion/src/optimizer/simplify_expressions.rs
##########
@@ -442,6 +442,8 @@ impl<'a> ExprRewriter for Simplifier<'a> {
use Expr::*;
use Operator::{And, Divide, Eq, Multiply, NotEq, Or};
+ let is_boolean_expr = self.is_boolean_type(&expr);
Review comment:
I recommend putting this into the case statement to avoid evaluating it
on each `Expr` (otherwise I think it ends up being `O(N^2)` as
`is_boolean_type` recursively checks all inputs
--
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]