AlenkaF commented on code in PR #47601:
URL: https://github.com/apache/arrow/pull/47601#discussion_r2371462027


##########
python/pyarrow/types.pxi:
##########
@@ -2918,7 +2918,7 @@ cdef class Schema(_Weakrefable):
         return schema, (list(self), self.metadata)
 
     def __hash__(self):
-        return hash((tuple(self), self.metadata))
+        return hash((tuple(self), frozenset(self.metadata.items() if 
self.metadata else {})))

Review Comment:
   Total nit, for the sake of clarity:
   ```suggestion
           metadata = frozenset(self.metadata.items() if self.metadata else {})
           return hash((tuple(self), metadata))
   ```



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

Reply via email to