alamb commented on code in PR #5734:
URL: https://github.com/apache/arrow-datafusion/pull/5734#discussion_r1149742705
##########
datafusion/expr/src/expr_schema.rs:
##########
@@ -68,7 +69,26 @@ impl ExprSchemable for Expr {
Expr::OuterReferenceColumn(ty, _) => Ok(ty.clone()),
Expr::ScalarVariable(ty, _) => Ok(ty.clone()),
Expr::Literal(l) => Ok(l.get_datatype()),
- Expr::Case(case) => case.when_then_expr[0].1.get_type(schema),
+ Expr::Case(case) => {
+ // when #5681 will be fixed, this code can be reverted to:
Review Comment:
I agree it would be best to have this code in Analyzer -- but if we can't
get it in there quickly we can merge this PR as is.
Thank you for the test case @mslapek
Thank you for leaving the link to
https://github.com/apache/arrow-datafusion/issues/5733 in the code
Do you know why the `CREATE TABLE AS SELECT` does not have type coercion (as
an optimizer pass) applied? It seems like that may be an oversight (and maybe
the root cause of this problem)?
--
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]