A batch of rules.
A strategy that runs until fix point or maxIterations times, whichever comes first.
An execution strategy for rules that indicates the maximum number of executions.
Casts to/from BooleanType are transformed into comparisons since the JVM does not consider Booleans to be numeric types.
Changes Boolean values to Bytes so that expressions like true < false can be Evaluated.
Substitute child plan with cte definitions
Coerces the type of different branches of a CASE WHEN statement to a common type.
Converts string "NaN"s that are in binary operators with a NaN-able types (Float / Double) to the appropriate numeric equivalent.
Calculates and propagates precision for fixed-precision decimals.
Hive only performs integral division with the DIV operator.
Casts types according to the expected input types for Expressions that have the trait
ExpectsInputTypes.
Extracts WindowExpressions from the projectList of a Project operator and aggregateExpressions of an Aggregate operator and creates individual Window operators for every distinct WindowSpecDefinition.
This ensure that the types for various functions are as expected.
Turns projections that contain aggregate expressions into aggregations.
Convert all expressions in in() list to the left operator type
A strategy that only runs once.
Promotes strings that appear in arithmetic expressions.
Applies any changes to AttributeReference data types that are made by other rules to instances higher in the query tree.
Replaces UnresolvedFunctions with concrete Expressions.
Rewrites table generating expressions that either need one or more of the following in order to be resolved:
Replaces UnresolvedAttributes with concrete AttributeReferences from a logical plan node's children.
Replaces UnresolvedRelations with concrete relations from the catalog.
In many dialects of SQL it is valid to sort by attributes that are not present in the SELECT clause.
When encountering a cast from a string representing a valid fractional number to an integral
type the jvm will throw a java.lang.NumberFormatException.
Removes no-op Alias expressions from the plan.
This rule finds expressions in HAVING clause filters that depend on unresolved attributes.
Widens numeric types and converts strings to numbers when appropriate.
Substitute child plan with WindowSpecDefinitions.
Executes the batches of rules defined by the subclass.
Executes the batches of rules defined by the subclass. The batches are executed serially using the defined execution strategy. Within each batch, rules are also executed serially.
Override to provide additional checks for correct analysis.
Override to provide additional checks for correct analysis. These rules will be evaluated after our built-in check rules.
Override to provide additional rules for the "Resolution" batch.
Override to provide additional rules for the "Resolution" batch.
A trivial Analyzer with an EmptyCatalog and EmptyFunctionRegistry. Used for testing when all relations are already filled in and the analyzer needs only to resolve attribute references.