thswlsqls opened a new pull request, #10376:
URL: https://github.com/apache/paimon/pull/10376

   ### Purpose
   
   fix #10374
   
   - `JsonFileReader` parsed JSON numbers as double, rounding numeric DECIMAL 
values (`12345678901234567.89` read as `...568.00`).
   - When the read type contains a DECIMAL (including nested), floats are now 
parsed as BigDecimal; other columns keep their previous double text.
   - `fileformat.md` maps DECIMAL to a JSON number; Paimon's writer stores 
DECIMAL as a string, so round-trip tests missed this.
   - Trade-off: in rows with a DECIMAL column, a JSON number `-0.0` for 
FLOAT/DOUBLE reads as `0.0` (same conditional approach as Flink's flink-json). 
Tables without DECIMAL are unchanged.
   
   ### Tests
   
   - Added to `JsonFileFormatTest`: `testReadNumericDecimalKeepsPrecision` 
(top-level, ARRAY, MAP, ROW; fails on master) and regression guards 
`testReadNumericNonDecimalFieldsInDecimalRowUnchanged`, 
`testReadNegativeZeroDoubleWithoutDecimal`.
   - `mvn -pl paimon-format clean install`: BUILD SUCCESS, 770 tests, 0 
failures.
   


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

Reply via email to