roryqi opened a new pull request, #12874:
URL: https://github.com/apache/gravitino/pull/12874

   ### What changes were proposed in this pull request?
   
   Cherry-pick commit `09e68277b2d8df18b397c2373a2ada2aef8ce04f` from #12599 to 
`branch-1.3`.
   
   This change:
   
   - Rejects integral statistic values that cannot be represented as a signed 
64-bit integer.
   - Rejects floating-point statistic values that parse to a non-finite double.
   - Adds tests for boundaries, nested values, and statistics update request 
deserialization.
   
   ### Why are the changes needed?
   
   Out-of-range numeric statistic values are silently converted and stored as 
different values in 1.3. For example, an integer larger than `Long.MAX_VALUE` 
wraps to a negative value, while an oversized floating-point value becomes 
`Infinity`.
   
   This backport prevents silent statistic corruption by rejecting these values.
   
   Backport: #12599
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes. Out-of-range numeric statistic values now result in a `400 Bad Request` 
instead of returning success and storing an altered value.
   
   No API signatures, properties, or stored-data formats are changed.
   
   ### How was this patch tested?
   
   ```shell
   ./gradlew :common:test --tests org.apache.gravitino.json.TestJsonUtils 
:common:javadoc :common:spotlessCheck -PskipITs
   ```
   


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