cloud-fan commented on code in PR #58408:
URL: https://github.com/apache/spark/pull/58408#discussion_r3996972567
##########
docs/sql-migration-guide.md:
##########
@@ -24,6 +24,7 @@ license: |
## Upgrading from Spark SQL 4.3 to 4.4
+- Since Spark 4.4, `format_string` and `printf` pass a decimal argument to
`java.util.Formatter` as a `java.math.BigDecimal`, so the floating-point
conversions (`%f`, `%e`, `%g`, `%a`) format decimals instead of failing with
`IllegalFormatConversionException`. As a side effect, `%h` on a decimal prints
a different hash than earlier releases, because it now hashes the
`java.math.BigDecimal` (unscaled value and scale) rather than Spark's internal
`Decimal` (which hashes consistently with `Double`). `%s` output and `NULL`
handling are unchanged.
Review Comment:
Confirmed: the implementation and migration note now limit support to
%e/%f/%g, and the %a rejection is covered.
<!-- SPARK_DEV_REVIEW_REPLY
{"feedback_id":"inline:3904348405","thread_id":"inline:3904348405","verdict_sha256":"8962b2f244b4a8a02254ee3e94fbb0fc1f898f281cfa0aba7c9b69ab4915925b"}
-->
--
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]