slfan1989 opened a new pull request, #3655:
URL: https://github.com/apache/iceberg-rust/pull/3655

   ## Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and 
enhancements and this helps us generate change logs for our releases. You can 
link an issue to this PR using the GitHub syntax. For example `Closes #123` 
indicates that this PR will close issue #123.
   -->
   
   - Closes #3654.
   
   ## What changes are included in this PR?
   
   Apply positive exponents before extracting the unscaled decimal value, so 
`1e3` produces `1000`. Validate precision before converting the coefficient to 
`i128`, so oversized inputs return `DataInvalid` instead of silently producing 
an incorrect value. JSON decimal parsing also validates the declared precision 
after rounding to the target scale.
   
   ## Are these changes tested?
   
   Added three regression tests covering positive exponents, the 38-digit 
precision boundary, and precision validation at the target JSON scale. All 
three failed before the fix and passed after it.
   
   ## AI Disclosure
   
   <!--
   
https://iceberg.apache.org/contribute/#guidelines-for-ai-assisted-contributions
   -->
   


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