yjshen commented on code in PR #2197: URL: https://github.com/apache/arrow-datafusion/pull/2197#discussion_r846930183
########## datafusion/physical-expr/src/expressions/case.rs: ########## @@ -178,6 +178,17 @@ 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() { + ColumnarValue::Scalar(ScalarValue::Boolean(Some(false))) + } else { + ColumnarValue::Scalar(value) + } + } + _ => when_value, + }; Review Comment: ```suggestion let when_value = match when_value { ColumnarValue::Scalar(value) if value.is_null() => { continue; } _ => when_value, }; ``` -- 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...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org