huaxingao commented on a change in pull request #26148: 
[SPARK-29499][CORE][PYSPARK] Add mapPartitionsWithIndex for RDDBarrier
URL: https://github.com/apache/spark/pull/26148#discussion_r336540740
 
 

 ##########
 File path: python/pyspark/rdd.py
 ##########
 @@ -2535,6 +2535,19 @@ def func(s, iterator):
             return f(iterator)
         return PipelinedRDD(self.rdd, func, preservesPartitioning, 
isFromBarrier=True)
 
+    def mapPartitionsWithIndex(self, f, preservesPartitioning=False):
+        """
+        .. note:: Experimental
+
+        Returns a new RDD by applying a function to each partition of the 
wrapped RDD,
 
 Review comment:
   adding "adding "while tracking the index of the original partition"?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to