Jefffrey commented on code in PR #17628:
URL: https://github.com/apache/datafusion/pull/17628#discussion_r2357129883


##########
datafusion/optimizer/src/simplify_expressions/expr_simplifier.rs:
##########
@@ -1409,6 +1409,47 @@ impl<S: SimplifyInfo> TreeNodeRewriter for 
Simplifier<'_, S> {
                 Transformed::yes(*then_)
             }
 
+            // Remove WHEN false clauses and handle WHEN true optimizations
+            Expr::Case(Case {
+                expr: None,
+                when_then_expr,
+                else_expr,
+            }) if !when_then_expr.is_empty() => {

Review Comment:
   Does this if guard make the below case arm unreachable?



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