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.
Coerces the type of different branches of a CASE WHEN statement to a common type.
Checks for non-aggregated attributes with aggregation
Makes sure all attributes and logical plans have been resolved.
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.
This ensure that the types for various functions are as expected.
Turns projections that contain aggregate expressions into aggregations.
When a SELECT clause has only a single expression and that expression is a Generator we convert the Project to a Generate.
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.
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 is it valid to sort by attributes that are not present in the SELECT clause.
Expands any references to Star (*) in project operators.
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.
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 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 analyser needs only to resolve attribute references.