Fokko commented on code in PR #245:
URL: https://github.com/apache/iceberg-python/pull/245#discussion_r1466140863


##########
pyiceberg/partitioning.py:
##########
@@ -85,6 +91,20 @@ def __str__(self) -> str:
         """Return the string representation of the PartitionField class."""
         return f"{self.field_id}: {self.name}: 
{self.transform}({self.source_id})"
 
+    def __hash__(self) -> int:
+        """Return the hash of the partition field."""
+        return hash((self.name, self.source_id, self.field_id, 
repr(self.transform)))

Review Comment:
   This is a bit awkward indeed. I would leave out the transform since it 
doesn't carry any information until it is bound.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to