andygrove commented on a change in pull request #8746:
URL: https://github.com/apache/arrow/pull/8746#discussion_r529690058



##########
File path: rust/datafusion/src/logical_plan/expr.rs
##########
@@ -141,6 +166,7 @@ impl Expr {
             Expr::Column(name) => 
Ok(schema.field_with_name(name)?.data_type().clone()),
             Expr::ScalarVariable(_) => Ok(DataType::Utf8),
             Expr::Literal(l) => Ok(l.get_datatype()),
+            Expr::Case { when_then_expr, .. } => 
when_then_expr[0].1.get_type(schema),

Review comment:
       I've added a check for the case where all "then" values are literals, to 
make sure they have the same type.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to