Fokko commented on code in PR #5124:
URL: https://github.com/apache/iceberg/pull/5124#discussion_r918362427


##########
python/pyiceberg/transforms.py:
##########
@@ -418,69 +392,39 @@ class UnknownTransform(Transform):
     _source_type: IcebergType = PrivateAttr()
     _transform: str = PrivateAttr()
 
-    def __init__(self, source_type: IcebergType, transform: str, **data: Any):
+    def __init__(self, transform: str, **data: Any):
         super().__init__(**data)
-        self._source_type = source_type
         self._transform = transform
 
-    def apply(self, value: Optional[S]):
+    def hash_function(self, source: IcebergType) -> Callable[[Optional[S]], 
Optional[T]]:
         raise AttributeError(f"Cannot apply unsupported transform: {self}")
 
     def can_transform(self, source: IcebergType) -> bool:
-        return self._source_type == source
+        return False

Review Comment:
   I had the same feeling, but the `UnknownTransform` feels like a transform 
that you don't want to use anyway. Returning `False`, felt like the right thing 
to do.



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