Github user viirya commented on the issue:

    https://github.com/apache/spark/pull/16633
  
    @scwf 
    > it use a special partitioner to do this, the partitioner like the 
row_numer in sql it give each row a uniform partitionid, so in the reduce task, 
each task handle num of rows very closely.
    
    I see @wzhfy wants to use a partitioner to uniformly distribute the rows in 
each local limit. However, because each local limit can produce different 
number of rows, you can't get a real uniform distribution. So in the global 
limit operation, you can't know how many partitions you need to use in order to 
satisfy the final limit number.


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

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to