jackwener commented on code in PR #7006:
URL: https://github.com/apache/arrow-datafusion/pull/7006#discussion_r1266383585
##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -1069,17 +1069,20 @@ impl<'a, S: SimplifyInfo> TreeNodeRewriter for
Simplifier<'a, S> {
//
// Note: the rationale for this rewrite is that the expr can then
be further
// simplified using the existing rules for AND/OR
- Expr::Case(case)
- if !case.when_then_expr.is_empty()
- && case.when_then_expr.len() < 3 // The rewrite is O(n!) so
limit to small number
- && info.is_boolean_type(&case.when_then_expr[0].1)? =>
+ Expr::Case(Case {
+ expr: None,
+ when_then_expr,
+ else_expr,
Review Comment:
👍
##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -1069,17 +1069,20 @@ impl<'a, S: SimplifyInfo> TreeNodeRewriter for
Simplifier<'a, S> {
//
// Note: the rationale for this rewrite is that the expr can then
be further
// simplified using the existing rules for AND/OR
- Expr::Case(case)
- if !case.when_then_expr.is_empty()
- && case.when_then_expr.len() < 3 // The rewrite is O(n!) so
limit to small number
- && info.is_boolean_type(&case.when_then_expr[0].1)? =>
+ Expr::Case(Case {
+ expr: None,
+ when_then_expr,
+ else_expr,
Review Comment:
👍
--
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]