andygrove commented on code in PR #1086:
URL: https://github.com/apache/datafusion-comet/pull/1086#discussion_r1851082098
##########
spark/src/main/scala/org/apache/comet/expressions/CometCast.scala:
##########
@@ -70,9 +70,13 @@ object CometCast {
case _ =>
Unsupported
}
- case (_: DecimalType, _: DecimalType) =>
- // https://github.com/apache/datafusion-comet/issues/375
- Incompatible()
+ case (from: DecimalType, to: DecimalType) =>
+ if (to.precision < from.precision) {
+ // https://github.com/apache/datafusion/issues/13492
+ Incompatible()
Review Comment:
We can add extra info here to show to the user.
```suggestion
Incompatible(Some("Casting to smaller precision is not supported"))
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]