Github user mateiz commented on the pull request:

    https://github.com/apache/spark/pull/876#issuecomment-44497883
  
    This functionality doesn't fit the definition of a Partitioner as used in 
Spark (which requires it to consistently return the same partition for each 
key), so it would be confusing to expose it as such. The `repartition` and 
`coalesce` methods are the right way to do it.
    
    In particular, Partitioners are also used to decide whether you can 
optimize joins and lookups based on a key's partition. This would break that 
behavior.


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