You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Andrew Ash (JIRA)" <ji...@apache.org> on 2014/06/15 19:02:01 UTC
[jira] [Created] (SPARK-2148) Document custom class as key needing
equals() AND hashcode()
Andrew Ash created SPARK-2148:
---------------------------------
Summary: Document custom class as key needing equals() AND hashcode()
Key: SPARK-2148
URL: https://issues.apache.org/jira/browse/SPARK-2148
Project: Spark
Issue Type: Bug
Components: Documentation
Affects Versions: 1.0.0
Reporter: Andrew Ash
Several support requests on user@ have been tracked down to using a custom class as the key in a {{groupByKey()}} or {{reduceByKey()}} that has a custom {{equals()}} method but not the corresponding custom {{hashcode()}} method.
Let's add a note in the documentation that custom keys need both {{equals()}} and {{hashcode()}} overridden, never just {{equals()}}
The right place for this addition might be as a sub-section or note in http://spark.apache.org/docs/latest/programming-guide.html#working-with-key-value-pairs
--
This message was sent by Atlassian JIRA
(v6.2#6252)