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

   ## Which issue does this PR close?
   
   - None filed. I found it while comparing `format_string` with Spark.
   
   ## Rationale for this change
   
   `format_string('%s', 1.0::DOUBLE)` returns `1`. Spark returns `1.0`. Values 
of 10^7 or more, or below 10^-3, also print in plain notation, for example 
`12345678.9` where Spark prints `1.23456789E7`.
   
   ## What changes are included in this PR?
   
   `%s` and `%S` of DOUBLE and FLOAT now use `java_float_text`, which moves 
from `to_json` to `function/float_utils.rs`.
   
   ## Are these changes tested?
   
   Yes. New `.slt` cases cover whole numbers, `-0.0`, scientific notation, 
FLOAT and a DOUBLE column. The expected results match Spark 3.5 on JDK 17 and 
23.
   
   ## Are there any user-facing changes?
   
   `%s` and `%S` of DOUBLE and FLOAT 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