Skip to content

Commit

Permalink
[SPARK-14749][SQL, TESTS] PlannerSuite failed when it run individually
Browse files Browse the repository at this point in the history
## 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 <[email protected]>

Closes #12532 from sbcd90/plannersuitetestsfix.
  • Loading branch information
sbcd90 authored and rxin committed Apr 20, 2016
1 parent e7791c4 commit fd82681
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit fd82681

Please sign in to comment.