SAY-5 opened a new pull request, #3682:
URL: https://github.com/apache/iceberg-python/pull/3682

   <!--
   Thanks for opening a pull request!
   -->
   
   <!-- In the case this PR will resolve an issue, please replace 
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
   Closes #3680
   
   # Rationale for this change
   
   `TruncateTransform.satisfies_order_of` reads `self.source_type` (and 
`other.source_type`) when the two transforms are not equal, but 
`TruncateTransform.__init__` only sets `_width` and never sets `_source_type`. 
Comparing two truncate transforms of different widths therefore raises 
`AttributeError: 'TruncateTransform' object has no attribute '_source_type'` 
instead of returning a boolean, because same-width comparisons only work by 
taking the early `self == other` return. Two truncate transforms are ordered by 
width, so the comparison can be decided from the widths alone.
   
   ## Are these changes tested?
   
   Yes. Added `test_truncate_satisfies_order_of_different_widths` and confirmed 
the existing transform tests still pass (`pytest tests/test_transforms.py -k 
"truncate or satisfies_order"`). The two `test_truncate_pyarrow_transforms` 
cases that fail locally require the optional `pyiceberg-core` extra and are 
unrelated to this change.
   
   ## Are there any user-facing changes?
   
   No.
   
   <!-- In the case of user-facing changes, please add the changelog label. -->
   


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