eric-maynard opened a new pull request, #46408:
URL: https://github.com/apache/spark/pull/46408

   ### What changes were proposed in this pull request?
   
   Currently, when reading a JSON like this:
   ```
   {"a": {"b": -999.99999999999999999999999999999999995}}
   ```
   
   With the schema:
   ```
   a STRING
   ```
   
   Spark will yield a result like this:
   ```
   {"b": -1000.0}
   ```
   
   ### Why are the changes needed?
   
   Currently, when reading a JSON like this:
   ```
   {"a": {"b": -999.99999999999999999999999999999999995}}
   ```
   
   With the schema:
   ```
   a STRING
   ```
   
   Spark will yield a result like this:
   ```
   {"b": -1000.0}
   ```
   
   Other changes such as changes to the input string's whitespace may also 
occur.
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes, when reading non-string fields from a JSON object using the STRING 
type, we will now extract the field exactly as it appears.
   
   ### How was this patch tested?
   Added a test in `JsonSuite.scala`
   
   
   ### Was this patch authored or co-authored using generative AI tooling?
   No


-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to