Github user JoshRosen commented on the pull request:

    https://github.com/apache/spark/pull/5927#issuecomment-99697229
  
    This seems fine to me.  If we were to design this all over again, I'd 
consider just dropping the `withIndex` methods in favor of either a 
`withContext` method or just requiring users to use `TaskContext.get`.  Since 
we already have `mapPartitionsWithIndex`, though, I suppose it's fine to add 
this for completeness.  Note that I wouldn't recommend that we add `*WithIndex` 
variants for most methods, but I think that `mapPartitions` and 
`foreachPartition` are somewhat low-level special cases compared to most RDD 
operations.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to