alamb commented on code in PR #2197:
URL: https://github.com/apache/arrow-datafusion/pull/2197#discussion_r849312085


##########
datafusion/physical-expr/src/expressions/case.rs:
##########
@@ -178,6 +178,13 @@ impl CaseExpr {
             let when_value = self.when_then_expr[i]
                 .0
                 .evaluate_selection(batch, &remainder)?;
+            // Treat 'NULL' as false value
+            let when_value = match when_value {
+                ColumnarValue::Scalar(value) if value.is_null() => {

Review Comment:
   This is a reasonable solution I think -- ideally we would have been able to 
coerce this value into a `ColumnarValue::Scalar(ScalarValue::Boolean(None))` at 
some earlier point.
   
   However, I think this special case is reasonable (and the test coverage is 
nice) so 👍  from me



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

Reply via email to