Github user viirya commented on the issue:
https://github.com/apache/spark/pull/16633
Ok. I think it is clearer now. We have two cases needed to solve:
1. After local limit, total rows in all partitions are (much) more than
limit number.
2. After local limit, total rows in all partitions are nearly the limit
number.
For 1. The current change in this PR is effective. We can save shuffling
and most of local limit processing.
For 2. The current change will re-process all the rows. So it is not
efficient. Fallback to old global limit will degrade parallelism, so if the
limit number is big, the performance will be bad. One solution is that we can
get the exact number of rows in each partitions after local limit by a modified
mapoutput statistics. And we can take only the partitions with required number
of rows.
@scwf What do you think?
---
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]