diff options
author | jerryshao <saisai.shao@intel.com> | 2014-12-16 14:08:28 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2014-12-16 14:12:08 -0800 |
commit | 1b6fc237c26d9fcb9d4afc9c93a21f9134231145 (patch) | |
tree | 07032bc7f23f91d294bc68f564ea999e85c8a157 | |
parent | 4f9916f1e8ffb1ffc647a036ee35702d7d7e6646 (diff) | |
download | spark-1b6fc237c26d9fcb9d4afc9c93a21f9134231145.tar.gz spark-1b6fc237c26d9fcb9d4afc9c93a21f9134231145.tar.bz2 spark-1b6fc237c26d9fcb9d4afc9c93a21f9134231145.zip |
[SPARK-4847][SQL]Fix "extraStrategies cannot take effect in SQLContext" issue
Author: jerryshao <saisai.shao@intel.com>
Closes #3698 from jerryshao/SPARK-4847 and squashes the following commits:
4741130 [jerryshao] Make later added extraStrategies effect when calling strategies
(cherry picked from commit dc8280dcca7b54793a3db644f74fd33460960d4a)
Signed-off-by: Michael Armbrust <michael@databricks.com>
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala | 2 | ||||
-rw-r--r-- | sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala index 31cc4170aa..ebd4cc920b 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala @@ -327,7 +327,7 @@ class SQLContext(@transient val sparkContext: SparkContext) def numPartitions = self.numShufflePartitions - val strategies: Seq[Strategy] = + def strategies: Seq[Strategy] = extraStrategies ++ ( CommandStrategy(self) :: DataSourceStrategy :: 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 34fc21e61f..5d8edfc783 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 @@ -338,7 +338,7 @@ class HiveContext(sc: SparkContext) extends SQLContext(sc) { val hivePlanner = new SparkPlanner with HiveStrategies { val hiveContext = self - override val strategies: Seq[Strategy] = extraStrategies ++ Seq( + override def strategies: Seq[Strategy] = extraStrategies ++ Seq( DataSourceStrategy, CommandStrategy(self), HiveCommandStrategy(self), |