sungwy opened a new issue, #3583:
URL: https://github.com/apache/iceberg-python/issues/3583

   ### Apache Iceberg version
   
   _No response_
   
   ### Please describe the bug 🐞
   
   The [spec](https://iceberg.apache.org/spec/#primitive-types) requires 
decimal precision to be 38 or less ("Scale is fixed, precision must be 38 or 
less"). Parsing the schema type string decimal(39, 0) (or any P > 38) should be 
rejected, but it is accepted: decimal(39, 0) creates `DecimalType(precision=39, 
scale=0)` with no error.
   
   The Java reference implementation rejects it: `DecimalType.of(39, 0)` raises 
`IllegalArgumentException`: Decimals with precision larger than 38 are not 
supported: 39 (api/.../types/Types.java).
   
   Precision above 38 isn't representable in decimal's fixed-byte storage, so 
silently accepting it can corrupt downstream encoding.
   
   Expected: reject decimal(P, S) with P > 38 at parse/construction time.
   
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [ ] I would be willing to contribute a fix for this bug with guidance from 
the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


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