viirya commented on code in PR #6763:
URL: https://github.com/apache/datafusion-comet/pull/6763#discussion_r4297063457


##########
native/spark-expr/src/conditional_funcs/case_when.rs:
##########
@@ -349,6 +350,13 @@ impl PhysicalExpr for CaseWhenExpr {
     }
 
     fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue> {
+        // No row chooses a branch, which both the eager and the lazy 
evaluation answer with a
+        // scalar NULL. A scalar from an empty batch is taken to mean the 
expression is constant,
+        // as IN does to build its list once, so return an empty array instead.

Review Comment:
   Opened #7055 for `branch-1.1`. It adds the check in `IfExpr::evaluate` and 
in a `SparkCaseExpr` wrapper around the `CaseExpr` from `create_case_expr`, and 
the SQL file test fails on `branch-1.1` without it.



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