[SQL][minor] rename apply for QueryPlanner
A follow-up of https://github.com/apache/spark/pull/5624
Author: Wenchen Fan <cloud0fan@outlook.com>
Closes #6142 from cloud-fan/tmp and squashes the following commits:
971a92b [Wenchen Fan] use plan instead of execute
24c5ffe [Wenchen Fan] rename apply
(cherry picked from commit f2cd00be35
)
Signed-off-by: Reynold Xin <rxin@databricks.com>
This commit is contained in:
parent
67ed0aa0fd
commit
aa8a0f9637
|
@ -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")
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue