Anurag-S1ngh opened a new pull request, #19254:
URL: https://github.com/apache/iceberg/pull/19254

   ## Summary
   
   - A float or double default written as JSON `1` was rejected, while `1.0` 
was accepted. The spec permits a JSON number, and JSON producers may omit the 
decimal point.
   - Accept any numeric node for float and double defaults, while still 
rejecting strings, booleans, and other non-numeric nodes.
   
   ## Changes
   
   - `SingleValueParser`: use `isNumber()` for the float and double default 
cases.
   - `TestSingleValueParser`: cover positive, negative, and large integral 
values, and keep the rejection tests for strings and booleans.
   - `TestSchemaParser`: cover both `initial-default` and `write-default` 
through the schema parser.
   
   ## Testing
   
   - `./gradlew :iceberg-core:test --tests 
"org.apache.iceberg.TestSingleValueParser" --tests 
"org.apache.iceberg.TestSchemaParser"` passes.
   - The new tests fail with `Cannot parse default as a float value: 1` without 
the change.
   - `spotlessApply` run for the module.
   
   Closes #18119
   


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