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/12 03:10:00 UTC
[jira] [Updated] (SPARK-40050) Eliminate sort if parent is local limit
[ https://issues.apache.org/jira/browse/SPARK-40050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yuming Wang updated SPARK-40050:
--------------------------------
Description:
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}
> Eliminate sort if parent is local limit
> ---------------------------------------
>
> 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