viirya commented on code in PR #11534:
URL: https://github.com/apache/datafusion/pull/11534#discussion_r1683003995


##########
datafusion/physical-expr/src/expressions/case.rs:
##########
@@ -89,10 +110,22 @@ impl CaseExpr {
         if when_then_expr.is_empty() {
             exec_err!("There must be at least one WHEN clause")
         } else {
+            let eval_method = if expr.is_some() {
+                EvalMethod::CaseWithExpression
+            } else if when_then_expr.len() == 1
+                && when_then_expr[0].1.as_any().is::<Column>()
+                && else_expr.is_none()

Review Comment:
   If `else` value is a null literal, is `else_expr` still none? Or is it a 
null literal?



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to