Create top level table schema.
Create top level table schema.
Create a StructType from a sequence of StructFields.
Create a StructType from a sequence of StructFields.
Create an expression from the given context.
Create an expression from the given context. This method just passes the context on to the visitor and only takes care of typing (We assume that the visitor returns an Expression here).
Create an alias (SubqueryAlias) for a sub-query.
Create an alias (SubqueryAlias) for a sub-query. This is practically the same as visitAliasedRelation and visitNamedExpression, ANTLR4 however requires us to use 3 different hooks.
Create an alias (SubqueryAlias) for a join relation.
Create an alias (SubqueryAlias) for a join relation. This is practically the same as visitAliasedQuery and visitNamedExpression, ANTLR4 however requires us to use 3 different hooks.
Create a binary arithmetic expression.
Create a binary arithmetic expression. The following arithmetic operators are supported: - Multiplication: '*' - Division: '/' - Hive Long Division: 'DIV' - Modulo: '%' - Addition: '+' - Subtraction: '-' - Binary AND: '&' - Binary XOR - Binary OR: '|'
Create a unary arithmetic expression.
Create a unary arithmetic expression. The following arithmetic operators are supported: - Plus: '+' - Minus: '-' - Bitwise Not: '~'
Create a BigDecimal Literal expression.
Create a BigDecimal Literal expression.
Create a Long Literal expression.
Create a Long Literal expression.
Create a Boolean literal expression.
Create a Boolean literal expression.
Create a Cast expression.
Create a Cast expression.
Override the default behavior for all visit methods.
Override the default behavior for all visit methods. This will only return a non-null result when the context has only one child. This is done because there is no generic method to combine the results of the context children. In all other cases null is returned.
Create a top level StructField from a column definition.
Create a top level StructField from a column definition.
Create a StructType from a number of column definitions.
Create a StructType from a number of column definitions.
Create an UnresolvedAttribute expression.
Create an UnresolvedAttribute expression.
Create a comparison expression.
Create a comparison expression. This compares two expressions. The following comparison operators are supported: - Equal: '=' or '==' - Null-safe Equal: '<=>' - Not Equal: '<>' or '!=' - Less than: '<' - Less then or Equal: '<=' - Greater than: '>' - Greater then or Equal: '>='
Create a StructField from a column definition.
Create a StructField from a column definition.
Create a StructType from a number of column definitions.
Create a StructType from a number of column definitions.
Create a complex DataType.
Create a complex DataType. Arrays, Maps and Structures are supported.
Create a decimal literal for a regular decimal number.
Create a decimal literal for a regular decimal number.
Create a dereference expression.
Create a dereference expression. The return type depends on the type of the parent, this can either be a UnresolvedAttribute (if the parent is an UnresolvedAttribute), or an UnresolvedExtractValue if the parent is some expression.
Create a Double Literal expression.
Create a Double Literal expression.
Create a filtering correlated sub-query (EXISTS).
Create a filtering correlated sub-query (EXISTS).
Create or resolve a FrameBoundary.
Create or resolve a FrameBoundary. Simple math expressions are allowed for Value Preceding/Following boundaries. These expressions must be constant (foldable) and return an integer value.
Create a logical plan for a given 'FROM' clause.
Create a logical plan for a given 'FROM' clause. Note that we support multiple (comma separated) relations here, these get converted into a single plan by condition-less inner join.
Create a (windowed) Function expression.
Create a (windowed) Function expression.
Create a function database (optional) and name pair.
Create a function database (optional) and name pair.
Create a Sequence of Strings for a parenthesis enclosed alias list.
Create a Sequence of Strings for a parenthesis enclosed alias list.
Create a Sequence of Strings for an identifier list.
Create a Sequence of Strings for an identifier list.
Create an inline table (a virtual table in Hive parlance).
Create an inline table (a virtual table in Hive parlance).
Create an integral literal expression.
Create an integral literal expression. The code selects the most narrow integral type possible, either a BigDecimal, a Long or an Integer is returned.
Create a CalendarInterval literal expression.
Create a CalendarInterval literal expression. An interval expression can contain multiple unit value pairs, for instance: interval 2 months 2 days.
Create a CalendarInterval for a unit value pair.
Create a CalendarInterval for a unit value pair. Two unit configuration types are supported: - Single unit. - From-To unit (only 'YEAR TO MONTH' and 'DAY TO SECOND' are supported).
Combine a number of boolean expressions into a balanced expression tree.
Combine a number of boolean expressions into a balanced expression tree. These expressions are either combined by a logical And or a logical Or.
A balanced binary tree is created because regular left recursive trees cause considerable performance degradations and can cause stack overflows.
Invert a boolean expression.
Invert a boolean expression.
Create a logical plan which allows for multiple inserts using one 'from' statement.
Create a logical plan which allows for multiple inserts using one 'from' statement. These queries have the following SQL form:
[WITH cte...]? FROM src [INSERT INTO tbl1 SELECT *]+
For example:
FROM db.tbl1 A INSERT INTO dbo.tbl1 SELECT * WHERE A.value = 10 LIMIT 5 INSERT INTO dbo.tbl2 SELECT * WHERE A.value = 12
This (Hive) feature cannot be combined with set-operators.
Create an aliased expression if an alias is specified.
Create an aliased expression if an alias is specified. Both single and multi-aliases are supported.
Create a named logical plan.
Create a named logical plan.
This is only used for Common Table Expressions.
Create a partition specification map without optional values.
Create a partition specification map without optional values.
Create a NULL literal expression.
Create a NULL literal expression.
Create an expression for an expression between parentheses.
Create an expression for an expression between parentheses. This is need because the ANTLR visitor cannot automatically convert the nested context into an expression.
Create a partition specification map.
Create a partition specification map.
Create a predicated expression.
Create a predicated expression. A predicated expression is a normal expression with a predicate attached to it, for example:
a + 1 IS NULL
Resolve/create a primitive type.
Resolve/create a primitive type.
Create a top-level plan with Common Table Expressions.
Create a top-level plan with Common Table Expressions.
Create a logical plan using a query specification.
Create a logical plan using a query specification.
Create a single relation referenced in a FROM claused.
Create a single relation referenced in a FROM claused. This method is used when a part of the join condition is nested, for example:
select * from t1 join (t2 cross join t3) on col1 = col2
Create a CreateStruct expression.
Create a CreateStruct expression.
Create a condition based CaseWhen expression.
Create a condition based CaseWhen expression. This has the following SQL syntax:
CASE WHEN [predicate] THEN [expression] ... ELSE [expression] END
the parse tree
Connect two queries by a Set operator.
Connect two queries by a Set operator.
Supported Set operators are: - UNION [DISTINCT] - UNION ALL - EXCEPT [DISTINCT] - MINUS [DISTINCT] - INTERSECT [DISTINCT]
Create a value based CaseWhen expression.
Create a value based CaseWhen expression. This has the following SQL form:
CASE [expression] WHEN [value] THEN [expression] ... ELSE [expression] END
Create a logical plan for a regular (single-insert) query.
Create a logical plan for a regular (single-insert) query.
Create a Short Literal expression.
Create a Short Literal expression.
Create a SortOrder expression.
Create a SortOrder expression.
Create a star (i.
Create a star (i.e. all) expression; this selects all elements (in the specified object). Both un-targeted (global) and targeted aliases are supported.
Convert a constant of any type into a string.
Convert a constant of any type into a string. This is typically used in DDL commands, and its main purpose is to prevent slight differences due to back to back conversions i.e.: String -> Literal -> String.
Create a String literal expression.
Create a String literal expression.
Create a logical plan for a sub-query.
Create a logical plan for a sub-query.
Create a ScalarSubquery expression.
Create a ScalarSubquery expression.
Create an UnresolvedExtractValue expression, this is used for subscript access to an array.
Create an UnresolvedExtractValue expression, this is used for subscript access to an array.
Create an un-aliased table reference.
Create an un-aliased table reference. This is typically used for top-level table references, for example:
INSERT INTO db.tbl2 TABLE db.tbl1
Create a TableIdentifier from a 'tableName' or 'databaseName'.
Create a TableIdentifier from a 'tableName' or 'databaseName'.'tableName' pattern.
Create an aliased table reference.
Create an aliased table reference. This is typically used in FROM clauses.
Create a table-valued function call with arguments, e.
Create a table-valued function call with arguments, e.g. range(1000)
Create a current timestamp/date expression.
Create a current timestamp/date expression. These are different from regular function because they do not require the user to specify braces when calling them.
Create a Byte Literal expression.
Create a Byte Literal expression.
Create a typed Literal expression.
Create a typed Literal expression. A typed literal has the following SQL syntax:
[TYPE] '[VALUE]'
Currently Date, Timestamp and Binary typed literals are supported.
Create a window definition, i.
Create a window definition, i.e. WindowSpecDefinition.
Create a reference to a window frame, i.
Create a reference to a window frame, i.e. WindowSpecReference.
Create a (Hive based) ScriptInputOutputSchema.
Create a (Hive based) ScriptInputOutputSchema.
The AstBuilder converts an ANTLR4 ParseTree into a catalyst Expression, LogicalPlan or TableIdentifier.