Simplifies boolean expressions: 1.
Attempts to eliminate the reading of unneeded columns from the query plan using the following transformations:
Combines two adjacent Filter operators into one, merging the conditions into one conjunctive predicate.
Combines two adjacent Limit operators into one, merging the expressions into one single expression.
Replaces Expressions that can be statically evaluated with equivalent Literal values.
Converts local operations (i.
Speeds up aggregates on fixed-precision decimals by executing them on unscaled Long values.
Simplifies LIKE expressions that do not need full regular expressions to evaluate the condition.
Replaces Expressions that can be statically evaluated with equivalent Literal values.
Replaces (value, seq[Literal]) with optimized version(value, HashSet[Literal]) which is much faster
Combines two adjacent Project operators into one and perform alias substitution, merging the expressions into one single expression.
Push Filter operators through Aggregate operators, iff the filters reference only non-aggregate attributes (typically literals or grouping expressions).
Push Filter operators through Generate operators.
Pushes down Filter operators where the condition
can be
evaluated using only the attributes of the left or right side of a join.
Pushes Filter operators through Project operators, in-lining any Aliases that were defined in the projection.
Removes nodes that are not necessary.
Removes literals from group expressions in Aggregate, as they have no effect to the result but only makes the grouping key bigger.
Replaces logical Distinct operator with an Aggregate operator.
Pushes operations down into a Sample.
Pushes certain operations to both sides of a Union, Intersect or Except operator.
Removes the inner case conversion expressions that are unnecessary because the inner conversion is overwritten by the outer one.
Removes Casts that are unnecessary because the input is already the correct type.
Removes filters that can be evaluated trivially.