Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-39780: [Python][Parquet] Support hashing for FileMetaData an…
…d ParquetSchema (apache#39781) I think the hash, especially for `FileMetaData` could be better, maybe just use return of `__repr__`, even though that won't include row group info? ### Rationale for this change Helpful for dependent projects. ### What changes are included in this PR? Impl `__hash__` for `ParquetSchema` and `FileMetaData` ### Are these changes tested? Yes ### Are there any user-facing changes? Supports hashing metadata: ```python In [1]: import pyarrow.parquet as pq In [2]: f = pq.ParquetFile('test.parquet') In [3]: hash(f.metadata) Out[3]: 4816453453708427907 In [4]: hash(f.metadata.schema) Out[4]: 2300988959078172540 ``` * Closes: apache#39780 Authored-by: Miles Granger <[email protected]> Signed-off-by: Antoine Pitrou <[email protected]>
- Loading branch information