Skip to content
Snippets Groups Projects
Commit fd826819 authored by Subhobrata Dey's avatar Subhobrata Dey Committed by Reynold Xin
Browse files

[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.
parent e7791c4f
No related branches found
No related tags found
No related merge requests found
......@@ -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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment