EliminateSubqueryAliases Logical Optimization¶
EliminateSubqueryAliases
is a base logical optimization that <
EliminateSubqueryAliases
is part of the Finish Analysis once-executed batch in the standard batches of the Logical Optimizer.
EliminateSubqueryAliases
is simply a <Rule[LogicalPlan]
.
[source, scala]¶
// Using Catalyst DSL import org.apache.spark.sql.catalyst.dsl.plans._ val t1 = table("t1") val logicalPlan = t1.subquery('a)
import org.apache.spark.sql.catalyst.analysis.EliminateSubqueryAliases val afterEliminateSubqueryAliases = EliminateSubqueryAliases(logicalPlan) scala> println(afterEliminateSubqueryAliases.numberedTreeString) 00 'UnresolvedRelation t1
Executing Rule¶
apply(plan: LogicalPlan): LogicalPlan
apply
simply removes (eliminates) <
apply
is part of the Rule abstraction.