alamb commented on code in PR #9038:
URL: https://github.com/apache/arrow-datafusion/pull/9038#discussion_r1470194952
##########
datafusion/optimizer/src/analyzer/type_coercion.rs:
##########
@@ -414,7 +414,22 @@ impl TreeNodeRewriter for TypeCoercionRewriter {
));
Ok(expr)
}
- expr => Ok(expr),
+ Expr::Alias(_)
+ | Expr::Column(_)
+ | Expr::ScalarVariable(_, _)
+ | Expr::Literal(_)
+ | Expr::SimilarTo(_)
+ | Expr::IsNotNull(_)
+ | Expr::IsNull(_)
+ | Expr::Negative(_)
Review Comment:
🤔 looks like there are some other bugs here;
```
❯ select -'100';
Internal error: Can't create negative physical expr for (- 'Literal { value:
Utf8("100") }'), the type of child expr is Utf8, not signed numeric.
This was likely caused by a bug in DataFusion's code and we would welcome
that you file an bug report in our issue tracker
❯ select -'100'::int;
+-----------------+
| (- Utf8("100")) |
+-----------------+
| -100 |
+-----------------+
```
I will file another ticket --
https://github.com/apache/arrow-datafusion/issues/9060
--
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]