rdblue commented on code in PR #5124:
URL: https://github.com/apache/iceberg/pull/5124#discussion_r917462590
##########
python/pyiceberg/transforms.py:
##########
@@ -96,6 +127,38 @@ def dedup_name(self) -> str:
def __str__(self) -> str:
return self.__root__
+ def __eq__(self, other: Any) -> bool:
+ if isinstance(other, Transform):
+ return self.__root__ == other.__root__
+ return False
+
+
+class UnboundTransform(Transform):
Review Comment:
Looking at the Java side a little more, I think there's an alternative to
making this `UnboundTransform` change. The Java implementation really only
needs the source type for the `apply` method. I think you could solve this
problem by changing the `Transform` API. Instead of having `apply` on
`Transform`, you could put `apply` on a `Transformer` class, then add
`forType(t: IcebergType) -> Transformer` to `Transform`. That may be cleaner in
the long term, although I think this works for now.
--
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]