TheNeuralBit commented on a change in pull request #14156: URL: https://github.com/apache/beam/pull/14156#discussion_r595266285
########## File path: sdks/python/apache_beam/pvalue.py ########## @@ -666,15 +666,14 @@ def as_dict(self): return dict(self.__dict__) def __iter__(self): - for _, value in sorted(self.__dict__.items()): + for _, value in self.__dict__.items(): yield value def __repr__(self): - return 'Row(%s)' % ', '.join( - '%s=%r' % kv for kv in sorted(self.__dict__.items())) + return 'Row(%s)' % ', '.join('%s=%r' % kv for kv in self.__dict__.items()) def __hash__(self): - return hash(type(sorted(self.__dict__.items()))) + return hash(type(self.__dict__.items())) def __eq__(self, other): return type(self) == type(other) and self.__dict__ == other.__dict__ Review comment: Hm that's consistent with the current implementation, but IMO it makes sense to make this sensitive to field order. That will be consistent with Java, where two Rows with different schemas are considered unequal. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org