aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/main/scala/org/apache
diff options
context:
space:
mode:
authorSubhobrata Dey <sbcd90@gmail.com>2016-04-20 14:26:07 -0700
committerReynold Xin <rxin@databricks.com>2016-04-20 14:26:07 -0700
commitfd82681945447d97df368bcdcd112b08bd541cca (patch)
treec7b8c06ec3a4242efba42a61c6680dcc676a848f /sql/core/src/main/scala/org/apache
parente7791c4f69aaa150e6ddb30b6d4ba2b0ea3c7807 (diff)
downloadspark-fd82681945447d97df368bcdcd112b08bd541cca.tar.gz
spark-fd82681945447d97df368bcdcd112b08bd541cca.tar.bz2
spark-fd82681945447d97df368bcdcd112b08bd541cca.zip
[SPARK-14749][SQL, TESTS] PlannerSuite failed when it run individually
## What changes were proposed in this pull request? 3 testcases namely, ``` "count is partially aggregated" "count distinct is partially aggregated" "mixed aggregates are partially aggregated" ``` were failing when running PlannerSuite individually. The PR provides a fix for this. ## How was this patch tested? unit tests (If this patch involves UI changes, please attach a screenshot; otherwise, remove this) Author: Subhobrata Dey <sbcd90@gmail.com> Closes #12532 from sbcd90/plannersuitetestsfix.
Diffstat (limited to 'sql/core/src/main/scala/org/apache')
-rw-r--r--sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala
index ddcae0fe07..35228643a5 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala
@@ -51,7 +51,10 @@ class QueryExecution(val sqlContext: SQLContext, val logical: LogicalPlan) {
}
}
- lazy val analyzed: LogicalPlan = sqlContext.sessionState.analyzer.execute(logical)
+ lazy val analyzed: LogicalPlan = {
+ SQLContext.setActive(sqlContext)
+ sqlContext.sessionState.analyzer.execute(logical)
+ }
lazy val withCachedData: LogicalPlan = {
assertAnalyzed()