parthchandra opened a new pull request, #3939: URL: https://github.com/apache/datafusion-comet/pull/3939
## Which issue does this PR close? Part of https://github.com/apache/datafusion-comet/issues/286 ## Rationale for this change `CometCast.canCastToString` had previously marked DecimalType -> StringType as Compatible with a caveat. However, the native Decimal128 -> String cast was not explicitly handled in cast_array and it was falling through to DataFusion's built-in cast, which was incompatible with Spark legacy mode for large scale values. For example, zero with a large scale: Decimal(38,18) zero exponent = -18 which produced "0E-18" in Spark LEGACY but "0.000000000000000000" from Comet TRY and ANSI modes are compatible ## What changes are included in this PR? Adds explicit handling for legacy mode ## How are these changes tested? unit tests -- 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]
