alamb commented on code in PR #2819:
URL: https://github.com/apache/arrow-datafusion/pull/2819#discussion_r912349247
##########
datafusion/physical-expr/src/expressions/case.rs:
##########
@@ -635,4 +704,67 @@ mod tests {
RecordBatch::try_from_iter(vec![("load4", Arc::new(load4) as
ArrayRef)])?;
Ok(batch)
}
+
+ #[test]
+ fn case_test_incompatible() -> Result<()> {
+ // 1 then is int64
+ // 2 then is boolean
+ let batch = case_test_batch()?;
+ let schema = batch.schema();
+
+ // CASE WHEN a = 'foo' THEN 123 WHEN a = 'bar' THEN true END
+ let when1 = binary(
+ col("a", &schema)?,
+ Operator::Eq,
+ lit(ScalarValue::Utf8(Some("foo".to_string()))),
Review Comment:
https://github.com/apache/arrow-datafusion/pull/2828
--
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]