Skip to content

Commit

Permalink
[SQL][minor] rename apply for QueryPlanner
Browse files Browse the repository at this point in the history
A follow-up of apache#5624

Author: Wenchen Fan <[email protected]>

Closes apache#6142 from cloud-fan/tmp and squashes the following commits:

971a92b [Wenchen Fan] use plan instead of execute
24c5ffe [Wenchen Fan] rename apply
  • Loading branch information
cloud-fan authored and rxin committed May 14, 2015
1 parent 7fb715d commit f2cd00b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ abstract class QueryPlanner[PhysicalPlan <: TreeNode[PhysicalPlan]] {
* filled in automatically by the QueryPlanner using the other execution strategies that are
* available.
*/
protected def planLater(plan: LogicalPlan) = apply(plan).next()
protected def planLater(plan: LogicalPlan) = this.plan(plan).next()

def apply(plan: LogicalPlan): Iterator[PhysicalPlan] = {
def plan(plan: LogicalPlan): Iterator[PhysicalPlan] = {
// Obviously a lot to do here still...
val iter = strategies.view.flatMap(_(plan)).toIterator
assert(iter.hasNext, s"No plan for $plan")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ class SQLContext(@transient val sparkContext: SparkContext)
// TODO: Don't just pick the first one...
lazy val sparkPlan: SparkPlan = {
SparkPlan.currentContext.set(self)
planner(optimizedPlan).next()
planner.plan(optimizedPlan).next()
}
// executedPlan should not be used to initialize any SparkPlan. It should be
// only used for execution.
Expand Down

0 comments on commit f2cd00b

Please sign in to comment.