diff options
author | Josh Rosen <joshrosen@databricks.com> | 2016-02-10 11:00:38 -0800 |
---|---|---|
committer | Josh Rosen <joshrosen@databricks.com> | 2016-02-10 11:00:38 -0800 |
commit | 5cf20598cec4e60b53c0e40dc4243f436396e7fc (patch) | |
tree | b29ee05e5e5b165c78dcea076ad0611788aabc62 /sql/hive | |
parent | 80cb963ad963e26c3a7f8388bdd4ffd5e99aad1a (diff) | |
download | spark-5cf20598cec4e60b53c0e40dc4243f436396e7fc.tar.gz spark-5cf20598cec4e60b53c0e40dc4243f436396e7fc.tar.bz2 spark-5cf20598cec4e60b53c0e40dc4243f436396e7fc.zip |
[SPARK-13254][SQL] Fix planning of TakeOrderedAndProject operator
The patch for SPARK-8964 ("use Exchange to perform shuffle in Limit" / #7334) inadvertently broke the planning of the TakeOrderedAndProject operator: because ReturnAnswer was the new root of the query plan, the TakeOrderedAndProject rule was unable to match before BasicOperators.
This patch fixes this by moving the `TakeOrderedAndCollect` and `CollectLimit` rules into the same strategy.
In addition, I made changes to the TakeOrderedAndProject operator in order to make its `doExecute()` method lazy and added a new TakeOrderedAndProjectSuite which tests the new code path.
/cc davies and marmbrus for review.
Author: Josh Rosen <joshrosen@databricks.com>
Closes #11145 from JoshRosen/take-ordered-and-project-fix.
Diffstat (limited to 'sql/hive')
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala index 05863ae183..2433b54ffc 100644 --- a/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala +++ b/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala @@ -559,7 +559,7 @@ class HiveContext private[hive]( HiveCommandStrategy(self), HiveDDLStrategy, DDLStrategy, - TakeOrderedAndProject, + SpecialLimits, InMemoryScans, HiveTableScans, DataSinks, |