hareshkh opened a new pull request, #428:
URL: https://github.com/apache/datafusion-spark/pull/428

   ## Which issue does this PR close?
   
   - Closes #39.
   
   ## Rationale for this change
   
   `format_string('%s', 1.50::DECIMAL(10, 2))` returns `150`. Spark returns 
`1.50`.
   
   ## What changes are included in this PR?
   
   `%s` and `%S` of `Decimal128` and `Decimal256` now format the value like 
Java's `BigDecimal.toString`, which is what Spark uses. For example `1.50`, 
`1E-7` and `0E-10`.
   
   ## Are these changes tested?
   
   Yes. The `xfail` cases for #39 in `string/format_string.slt` are updated, 
and new cases cover plain and scientific notation. The expected results were 
checked against Spark 3.5.
   
   ## Are there any user-facing changes?
   
   `%s` and `%S` of a DECIMAL now match Spark.
   


-- 
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]

Reply via email to