def cartesian(other)
      _deserializer = Spark::Serializer::Cartesian.new(self.deserializer, other.deserializer)

      new_jrdd = jrdd.cartesian(other.jrdd)
      RDD.new(new_jrdd, context, serializer, _deserializer)
    end
def cartesian(other)
      _deserializer = Spark::Serializer::Cartesian.new(self.deserializer, other.deserializer)

      new_jrdd = jrdd.cartesian(other.jrdd)
      RDD.new(new_jrdd, context, serializer, _deserializer)
    end
Return the Cartesian product of this RDD and another one, that is, the
 RDD of all pairs of elements `(a, b)` where `a` is in `self` and
 `b` is in `other`.

 == Example:
   rdd1 = $sc.parallelize([1,2,3])
   rdd2 = $sc.parallelize([4,5,6])

   rdd1.cartesian(rdd2).collect
   # => [[1, 4], [1, 5], [1, 6], [2, 4], [2, 5], [2, 6], [3, 4], [3, 5], [3, 6]]