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


##########
python/pyiceberg/transforms.py:
##########
@@ -96,25 +125,27 @@ 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 BaseBucketTransform(Transform[S, int]):
+
+class BucketTransform(Transform[S, int]):
     """Base Transform class to transform a value into a bucket partition value
 
     Transforms are parameterized by a number of buckets. Bucket partition 
transforms use a 32-bit
     hash of the source value to produce a positive value by mod the bucket 
number.
 
     Args:
-      source_type (Type): An Iceberg Type of IntegerType, LongType, 
DecimalType, DateType, TimeType,
-      TimestampType, TimestamptzType, StringType, BinaryType, FixedType, 
UUIDType.
       num_buckets (int): The number of buckets.
     """
 
     _source_type: IcebergType = PrivateAttr()
     _num_buckets: PositiveInt = PrivateAttr()
 
-    def __init__(self, source_type: IcebergType, num_buckets: int, **data: 
Any):
+    def __init__(self, num_buckets: int, **data: Any):
         super().__init__(__root__=f"bucket[{num_buckets}]", **data)
-        self._source_type = source_type

Review Comment:
   Remove the `_source_type` field as well?



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