TheNeuralBit commented on code in PR #23876:
URL: https://github.com/apache/beam/pull/23876#discussion_r1007456364
##########
sdks/python/apache_beam/pvalue.py:
##########
@@ -669,8 +669,8 @@ def __hash__(self):
return hash(self.__dict__.items())
def __eq__(self, other):
- return type(self) == type(other) and all(
- s == o for s, o in zip(self.__dict__.items(), other.__dict__.items()))
+ return (type(self) == type(other) and
+ self.__dict__.items() == other.__dict__.items())
Review Comment:
I think `items` will take order into account. But it would be good to have a
simple unit test that verifies `beam.Row(x=1, y=2) != beam.Row(y=2. x=1)`.
--
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]