Github user JoshRosen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/8707#discussion_r39297676
  
    --- Diff: python/pyspark/tests.py ---
    @@ -218,6 +218,11 @@ def test_namedtuple(self):
             p2 = loads(dumps(p1, 2))
             self.assertEqual(p1, p2)
     
    +        from pyspark.cloudpickle import dumps
    +        P2 = loads(dumps(P))
    +        p3 = P2(1, 3)
    +        self.assertEqual(p1, p3)
    --- End diff --
    
    Ah, interesting: presumably `P` and `P2` are different classes but 
instances created from them are still comparable for equality. Do we also need 
to check that those instances claim to belong to the same class? It seems way 
less likely that users could rely on the class comparison behavior, so probably 
not a huge priority to look at.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to