You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "tvalentyn (via GitHub)" <gi...@apache.org> on 2023/02/13 23:51:30 UTC

[GitHub] [beam] tvalentyn commented on a diff in pull request #23876: Fix beam.Row.__eq__ for rows with trailing columns

tvalentyn commented on code in PR #23876:
URL: https://github.com/apache/beam/pull/23876#discussion_r1105139292


##########
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 added a test test and went ahead with my suggestion. relying on `items()` alone was not sufficient.



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org