Expand Unary Logical Operator¶
Expand is a spark-sql-LogicalPlan.md#UnaryNode[unary logical operator] that represents
Rollup, GroupingSets.md[GroupingSets] and expressions/TimeWindow.md[TimeWindow] logical operators after they have been resolved at <
FIXME Examples for 1. Cube 2. Rollup 3. GroupingSets 4. See TimeWindow val q = ... scala> println(q.queryExecution.logical.numberedTreeString) ...
Expand logical operator is resolved to
ExpandExec physical operator in BasicOperators execution planning strategy.
[[properties]] .Expand's Properties [width="100%",cols="1,2",options="header"] |=== | Name | Description
AttributeSet from <
validConstraints | Empty set of expressions/Expression.md[expressions] |===
Expand logical operator is resolved to at analysis phase in the following logical evaluation rules:
TimeWindowing(for TimeWindow logical operator)
NOTE: Aggregate -> (Cube|Rollup|GroupingSets) -> constructAggregate -> constructExpand
val spark: SparkSession = ... // using q from the example above val plan = q.queryExecution.logical scala> println(plan.numberedTreeString) ...FIXME
=== [[optimizer]] Rule-Based Logical Query Optimization Phase
=== [[creating-instance]] Creating Expand Instance
Expand takes the following when created: