SubqueryAlias Unary Logical Operator¶
SubqueryAlias
is a <
SubqueryAlias
is <
-
AstBuilder
is requested to parse a <> or < > query, < > and < > in a SQL statement -
<
> operator is used -
SessionCatalog
is requested to find a table or view in catalogs -
RewriteCorrelatedScalarSubquery
logical optimization is requested to <> (when < > to < >, Project or Filter
logical operators with correlated scalar subqueries)
[[doCanonicalize]] SubqueryAlias
simply requests the <
[[output]] When requested for <SubqueryAlias
requests the <
NOTE: <SubqueryAlias
operators from a logical query plan.
NOTE: <SubqueryAlias
operators.
=== [[catalyst-dsl]][[subquery]][[as]] Catalyst DSL -- subquery
And as
Operators
[source, scala]¶
as(alias: String): LogicalPlan subquery(alias: Symbol): LogicalPlan
subquery and as operators in Catalyst DSL create a <
[source, scala]¶
import org.apache.spark.sql.catalyst.dsl.plans._ val t1 = table("t1")
val plan = t1.subquery('a) scala> println(plan.numberedTreeString) 00 'SubqueryAlias a 01 +- 'UnresolvedRelation t1
val plan = t1.as("a") scala> println(plan.numberedTreeString) 00 'SubqueryAlias a 01 +- 'UnresolvedRelation t1
=== [[creating-instance]] Creating SubqueryAlias Instance
SubqueryAlias
takes the following when created:
- [[alias]] Alias
- [[child]] Child <
>