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

   Closes #3680
   
   # Rationale for this change
   
   `TruncateTransform.satisfies_order_of` previously accessed 
`self.source_type` (and `other.source_type`), which raised `AttributeError: 
'TruncateTransform' object has no attribute '_source_type'` whenever comparing 
truncate transforms with different widths.
   
   Per the Iceberg spec and matching the Java reference implementation, 
ordering satisfaction between two truncate transforms depends purely on the 
width comparison (`self.width >= other.width`).
   
   This PR:
   1. Updates `TruncateTransform.satisfies_order_of` to check 
`isinstance(other, TruncateTransform)` and compare `self.width >= other.width`.
   2. Adds unit tests covering same/different width comparisons and 
cross-transform comparisons.
   
   ## Are these changes tested?
   
   Yes, added `test_truncate_satisfies_order_of` in `tests/test_transforms.py`. 
All tests and pre-commit linters pass cleanly.
   
   ## Are there any user-facing changes?
   
   No.


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