You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Michael Armbrust (JIRA)" <ji...@apache.org> on 2015/06/24 22:30:04 UTC
[jira] [Resolved] (SPARK-7289) Combine Limit and Sort to avoid
total ordering
[ https://issues.apache.org/jira/browse/SPARK-7289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Armbrust resolved SPARK-7289.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.5.0
Issue resolved by pull request 6780
[https://github.com/apache/spark/pull/6780]
> Combine Limit and Sort to avoid total ordering
> ----------------------------------------------
>
> Key: SPARK-7289
> URL: https://issues.apache.org/jira/browse/SPARK-7289
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 1.3.1
> Reporter: Fei Wang
> Assignee: Wenchen Fan
> Fix For: 1.5.0
>
>
> Optimize following sql
> select key from (select * from testData order by key) t limit 5
> from
> == Parsed Logical Plan ==
> 'Limit 5
> 'Project ['key]
> 'Subquery t
> 'Sort ['key ASC], true
> 'Project [*]
> 'UnresolvedRelation [testData], None
> == Analyzed Logical Plan ==
> Limit 5
> Project [key#0]
> Subquery t
> Sort [key#0 ASC], true
> Project [key#0,value#1]
> Subquery testData
> LogicalRDD [key#0,value#1], MapPartitionsRDD[1]
> == Optimized Logical Plan ==
> Limit 5
> Project [key#0]
> Sort [key#0 ASC], true
> LogicalRDD [key#0,value#1], MapPartitionsRDD[1]
> == Physical Plan ==
> Limit 5
> Project [key#0]
> Sort [key#0 ASC], true
> Exchange (RangePartitioning [key#0 ASC], 5), []
> PhysicalRDD [key#0,value#1], MapPartitionsRDD[1]
> to
> == Parsed Logical Plan ==
> 'Limit 5
> 'Project ['key]
> 'Subquery t
> 'Sort ['key ASC], true
> 'Project [*]
> 'UnresolvedRelation [testData], None
> == Analyzed Logical Plan ==
> Limit 5
> Project [key#0]
> Subquery t
> Sort [key#0 ASC], true
> Project [key#0,value#1]
> Subquery testData
> LogicalRDD [key#0,value#1], MapPartitionsRDD[1]
> == Optimized Logical Plan ==
> Project [key#0]
> Limit 5
> Sort [key#0 ASC], true
> LogicalRDD [key#0,value#1], MapPartitionsRDD[1]
> == Physical Plan ==
> Project [key#0]
> TakeOrdered 5, [key#0 ASC]
> PhysicalRDD [key#0,value#1], MapPartitionsRDD[1]
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org