Fokko commented on code in PR #4742: URL: https://github.com/apache/iceberg/pull/4742#discussion_r876239306
########## python/src/iceberg/schema.py: ########## @@ -67,6 +67,17 @@ def __repr__(self): f"Schema(fields={repr(self.columns)}, schema_id={self.schema_id}, identifier_field_ids={self.identifier_field_ids})" ) + def __eq__(self, other) -> bool: + if not other: + return False + + columns = list(self.columns) + + if len(columns) != len(other.columns): + return False + + return all([lhs == rhs for lhs, rhs in zip(columns, other.columns)]) Review Comment: Great point @kbendick. Now https://github.com/apache/iceberg/pull/4767 has been merged, the eq methods are generated automatically :) -- 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