Describe the bug, including details regarding any error messages, version, and platform.
In Python, pyarrow.Schema before was not hashable when it has metadata set.
>>> import pyarrow
>>> schema = pyarrow.schema([], metadata={b"1": b"1"})
>>> hash(schema)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pyarrow/types.pxi", line 2921, in pyarrow.lib.Schema.__hash__
TypeError: unhashable type: 'dict'
This is because the metadata (which is a dict) was tried to be hashed as-is, which doesn't work.
Corresponding fix is contianed in this PR:
#47601
Component(s)
Python