Skip to content

Commit

Permalink
SPARK-1589: Fix the incorrect compare
Browse files Browse the repository at this point in the history
JIRA: https://issues.apache.org/jira/browse/SPARK-1589

Author: zsxwing <zsxwing@gmail.com>

Closes #508 from zsxwing/SPARK-1589 and squashes the following commits:

570c67a [zsxwing] SPARK-1589: Fix the incorrect compare
  • Loading branch information
zsxwing authored and rxin committed Apr 24, 2014
1 parent 1d6abe3 commit 6ab7578
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,11 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
if (keyClass.isArray && partitioner.isInstanceOf[HashPartitioner]) {
throw new SparkException("Default partitioner cannot partition array keys.")
}
if (self.partitioner == partitioner) self else new ShuffledRDD[K, V, (K, V)](self, partitioner)
if (self.partitioner == Some(partitioner)) {
self
} else {
new ShuffledRDD[K, V, (K, V)](self, partitioner)
}
}

/**
Expand Down

0 comments on commit 6ab7578

Please sign in to comment.