You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yuming Wang (Jira)" <ji...@apache.org> on 2022/08/17 08:26:00 UTC
[jira] [Updated] (SPARK-40050) Eliminate the Sort if there is a LocalLimit between Join and Sort
[ https://issues.apache.org/jira/browse/SPARK-40050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yuming Wang updated SPARK-40050:
--------------------------------
Summary: Eliminate the Sort if there is a LocalLimit between Join and Sort (was: Eliminate sort if parent is local limit)
> Eliminate the Sort if there is a LocalLimit between Join and Sort
> -----------------------------------------------------------------
>
> Key: SPARK-40050
> URL: https://issues.apache.org/jira/browse/SPARK-40050
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.4.0
> Reporter: Yuming Wang
> Priority: Major
>
> It seems we can remove Sort operator:
> {code:scala}
> val projectPlan = testRelation.select($"a", $"b")
> val unnecessaryOrderByPlan = projectPlan.orderBy($"a".asc)
> val localLimitPlan = LocalLimit(Literal(2), unnecessaryOrderByPlan)
> val projectPlanB = testRelationB.select($"d")
> val joinPlan = localLimitPlan.join(projectPlanB, RightOuter).select($"a", $"d")
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org