Github user kmadhugit commented on a diff in the pull request: https://github.com/apache/spark/pull/7020#discussion_r33376146 --- Diff: core/src/main/scala/org/apache/spark/Partitioner.scala --- @@ -56,7 +56,7 @@ object Partitioner { */ def defaultPartitioner(rdd: RDD[_], others: RDD[_]*): Partitioner = { val bySize = (Seq(rdd) ++ others).sortBy(_.partitions.size).reverse - for (r <- bySize if r.partitioner.isDefined) { + for (r <- bySize if r.partitioner.isDefined && r.partitions.nonEmpty) { return r.partitioner.get } --- End diff -- We are dealing with two different members.. We are checking whether r.partitoner.isDefined and returning only when r.partitions.nonEmpty. There can be cases when r.partitioner is not defined but r.partitions can be non empty.
--- 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