[
https://issues.apache.org/jira/browse/SPARK-25352?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16605263#comment-16605263
]
Apache Spark commented on SPARK-25352:
--------------------------------------
User 'viirya' has created a pull request for this issue:
https://github.com/apache/spark/pull/22344
> Perform ordered global limit when limit number is bigger than
> topKSortFallbackThreshold
> ---------------------------------------------------------------------------------------
>
> Key: SPARK-25352
> URL: https://issues.apache.org/jira/browse/SPARK-25352
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 2.4.0
> Reporter: Liang-Chi Hsieh
> Priority: Major
>
> We have optimization on global limit to evenly distribute limit rows across
> all partitions. This optimization doesn't work for ordered results.
> For a query ending with sort + limit, in most cases it is performed by
> `TakeOrderedAndProjectExec`.
> But if limit number is bigger than `SQLConf.TOP_K_SORT_FALLBACK_THRESHOLD`,
> global limit will be used. At this moment, we need to do ordered global limit.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]