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

    https://github.com/apache/spark/pull/944#discussion_r13317153
  
    --- Diff: core/src/main/scala/org/apache/spark/rdd/RDD.scala ---
    @@ -655,7 +655,19 @@ abstract class RDD[T: ClassTag](
        * partitions* and the *same number of elements in each partition* (e.g. 
one was made through
        * a map on the other).
        */
    -  def zip[U: ClassTag](other: RDD[U]): RDD[(T, U)] = new ZippedRDD(sc, 
this, other)
    +  def zip[U: ClassTag](other: RDD[U]): RDD[(T, U)] = {
    +    zipPartitions(other, true) {(thisIter, otherIter) =>
    +      new Iterator[(T, U)] {
    +        def hasNext = (thisIter.hasNext, otherIter.hasNext) match {
    +          case (true, true) => true
    +          case (false, false) => false
    +          case _ => throw new IllegalArgumentException("Can only zip RDDs 
with " +
    --- End diff --
    
    Make this a SparkException instead


---
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.
---

Reply via email to