def coalesce(num_partitions)
      if self.is_a?(PipelinedRDD)
        deser = @command.serializer
      else
        deser = @command.deserializer
      end

      new_jrdd = jrdd.coalesce(num_partitions)
      RDD.new(new_jrdd, context, @command.serializer, deser)
    end
def coalesce(num_partitions)
      if self.is_a?(PipelinedRDD)
        deser = @command.serializer
      else
        deser = @command.deserializer
      end

      new_jrdd = jrdd.coalesce(num_partitions)
      RDD.new(new_jrdd, context, @command.serializer, deser)
    end
Return a new RDD that is reduced into num_partitions partitions.

 == Example:
   rdd = $sc.parallelize(0..10, 3)
   rdd.coalesce(2).glom.collect
   # => [[0, 1, 2], [3, 4, 5, 6, 7, 8, 9, 10]]