Skip to content
Permalink
Browse files

[SPARK-23140][SQL] Add DataSourceV2Strategy to Hive Session state's p…

…lanner

## What changes were proposed in this pull request?

`DataSourceV2Strategy` is missing in `HiveSessionStateBuilder`'s planner, which will throw exception as described in [SPARK-23140](https://issues.apache.org/jira/browse/SPARK-23140).

## How was this patch tested?

Manual test.

Author: jerryshao <sshao@hortonworks.com>

Closes #20305 from jerryshao/SPARK-23140.

(cherry picked from commit 7a22483)
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
  • Loading branch information...
jerryshao authored and cloud-fan committed Jan 18, 2018
1 parent 2a87c3a commit f801ac417ba13a975887ba83904ee771bc3a003e
Showing with 1 addition and 16 deletions.
  1. +1 −16 sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionStateBuilder.scala
@@ -96,22 +96,7 @@ class HiveSessionStateBuilder(session: SparkSession, parentState: Option[Session
override val sparkSession: SparkSession = session

override def extraPlanningStrategies: Seq[Strategy] =
super.extraPlanningStrategies ++ customPlanningStrategies

override def strategies: Seq[Strategy] = {
experimentalMethods.extraStrategies ++
extraPlanningStrategies ++ Seq(
FileSourceStrategy,
DataSourceStrategy(conf),
SpecialLimits,
InMemoryScans,
HiveTableScans,
Scripts,
Aggregation,
JoinSelection,
BasicOperators
)
}
super.extraPlanningStrategies ++ customPlanningStrategies ++ Seq(HiveTableScans, Scripts)
}
}

0 comments on commit f801ac4

Please sign in to comment.
You can’t perform that action at this time.