andygrove commented on code in PR #5136:
URL: https://github.com/apache/datafusion-comet/pull/5136#discussion_r3692062238
##########
spark/src/main/scala/org/apache/comet/expressions/CometCast.scala:
##########
@@ -425,8 +425,7 @@ object CometCast
DataTypes.IntegerType | DataTypes.LongType | DataTypes.TimestampType =>
Compatible()
case _: DecimalType =>
- // https://github.com/apache/datafusion-comet/issues/1371
- Incompatible(Some("There can be rounding differences"))
+ Compatible()
Review Comment:
Good catch — added in 069b1e0c1. Both the float and double `DecimalType`
arms now return `Compatible(Some(floatToDecimalJdkNote))`:
> Rounding matches Spark on JDK 19 and later. On older JDKs, Spark's own
result may differ for values whose shortest decimal form falls exactly on a
rounding tie
The constant carries a longer comment explaining the `Double.toString` /
JDK-4511638 background. The note flows into the generated `cast.md` matrix
automatically via `writeCastMatrixForMode`, so nothing checked in needed
regenerating. I also updated the cast audit doc, which had the same gap — it
claimed a bare `Compatible` without the caveat.
##########
spark/src/main/scala/org/apache/comet/expressions/CometCast.scala:
##########
@@ -436,8 +435,7 @@ object CometCast
DataTypes.IntegerType | DataTypes.LongType | DataTypes.TimestampType =>
Compatible()
case _: DecimalType =>
- // https://github.com/apache/datafusion-comet/issues/1371
- Incompatible(Some("There can be rounding differences"))
+ Compatible()
Review Comment:
Same fix applied here in 069b1e0c1 — the double arm shares the same
`floatToDecimalJdkNote` constant.
--
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]