You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Shawn Guo (JIRA)" <ji...@apache.org> on 2014/09/18 07:56:33 UTC
[jira] [Created] (SPARK-3581) RDD API(distinct/subtract) does not
work for RDD of Dictionaries
Shawn Guo created SPARK-3581:
--------------------------------
Summary: RDD API(distinct/subtract) does not work for RDD of Dictionaries
Key: SPARK-3581
URL: https://issues.apache.org/jira/browse/SPARK-3581
Project: Spark
Issue Type: Bug
Components: PySpark
Affects Versions: 1.1.0
Environment: Spark 1.0 1.1
JDK 1.6
Reporter: Shawn Guo
Priority: Minor
Construct a RDD of dictionaries(dictRDD),
try to use the RDD API, RDD.distinct() or RDD.subtract().
dictRDD = sc.parallelize(({'MOVIE_ID': 1, 'MOVIE_NAME': 'Lord of the Rings','MOVIE_DIRECTOR': 'Peter Jackson'},{'MOVIE_ID': 2, 'MOVIE_NAME': 'King King', 'MOVIE_DIRECTOR': 'Peter Jackson'},{'MOVIE_ID': 2, 'MOVIE_NAME': 'King King', 'MOVIE_DIRECTOR': 'Peter Jackson'}))
dictRDD.distinct().collect()
dictRDD.subtract(dictRDD).collect()
An error occurred while calling,
TypeError: unhashable type: 'dict'
I'm not sure if it is a bug or expected results.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org