iceberg-kitten opened a new pull request, #4433:
URL: https://github.com/apache/iceberg-python/pull/4433

   ## Why
   
   PyIceberg accepts `bucket[0]` and `truncate[0]` in partition specs. Applying 
either to an integer raises `ZeroDivisionError`. The Iceberg spec defines these 
operations using modulo, and Java requires both parameters to be greater than 
zero. [Iceberg spec](https://iceberg.apache.org/spec/#partition-transforms) · 
[Java 
bucket](https://github.com/apache/iceberg/blob/main/api/src/main/java/org/apache/iceberg/transforms/Bucket.java#L40-L43)
 · [Java 
truncate](https://github.com/apache/iceberg/blob/main/api/src/main/java/org/apache/iceberg/transforms/Truncate.java#L41-L43)
   
   ## What
   
   Reject non-positive bucket counts and truncate widths when the transform is 
created.
   
   ## Implementation
   
   Validate both parameters in their constructors so direct construction and 
partition-spec parsing share the same check.
   


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