Kayvan-Zahiri opened a new pull request, #14214:
URL: https://github.com/apache/gravitino/pull/14214

   ### What changes were proposed in this pull request?
   Count integer digits implied by a positive Decimal exponent in 
`Literals.decimal_literal`, and use scale zero for those values. Add 
positive-exponent, fractional-scale, value-preservation and 38-digit-boundary 
regression coverage.
   
   ### Why are the changes needed?
   Valid finite values such as `Decimal("1E+3")` currently raise a 
negative-scale ValueError. They should produce decimal(4,0), while values that 
require more than 38 integer digits should remain rejected. Four 
positive-exponent cases error before the fix; the precision-limit regression 
also fails because it receives the wrong validation error.
   
   Fixes #14213.
   
   ### Does this PR introduce _any_ user-facing change?
   The public literal helper accepts positive-exponent decimals within the 
existing type limits. No API signatures, dependencies, serialized input values, 
or fractional scale behavior change.
   
   ### How was this patch tested?
   707 selected Python unit tests pass: 225 API tests (including all 16 literal 
methods), 444 DTO tests and 38 JSON serialization tests. Changed-file Pylint 
4.0.5 scores 10/10; pinned Black 26.3.1 checks all 663 Python files without 
changes. `git diff --check` passes. Before the fix, four positive-exponent 
subcases error and the precision-boundary assertion fails. The fractional 
controls pass.
   
   Full Gradle/JVM/server/GVFS integrations and Python/platform matrices are 
not run. Only the Python core metadata dependencies and declared lint tools are 
installed in an isolated environment. Developed with Codex assistance and 
reproduced locally.
   


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