Sanjays2402 commented on code in PR #3682:
URL: https://github.com/apache/iceberg-python/pull/3682#discussion_r3610111280
##########
pyiceberg/transforms.py:
##########
@@ -897,11 +897,7 @@ def truncate_func(v: Any) -> Any:
def satisfies_order_of(self, other: Transform[S, T]) -> bool:
if self == other:
return True
- elif (
- isinstance(self.source_type, StringType)
- and isinstance(other, TruncateTransform)
- and isinstance(other.source_type, StringType)
- ):
+ elif isinstance(other, TruncateTransform):
Review Comment:
dropping the source_type check means an int/long/decimal transform now
satisfies_order_of another purely on width. is that the intended widening, or
should it stay type-gated? the java implementation only returns true within the
same type family, so one type family claiming to satisfy another (string vs
int) could let an invalid sort-order replacement through.
--
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]