class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with Logging
The AstBuilder converts an ANTLR4 ParseTree into a catalyst Expression, LogicalPlan or TableIdentifier.
- Alphabetic
- By Inheritance
- AstBuilder
- Logging
- SqlBaseBaseVisitor
- SqlBaseVisitor
- AbstractParseTreeVisitor
- ParseTreeVisitor
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
type
InsertDirParams = (Boolean, CatalogStorageFormat, Option[String])
Parameters used for writing query to a directory: (isLocal, CatalogStorageFormat, provider).
-
type
InsertTableParams = (Seq[String], Map[String, Option[String]], Boolean)
Parameters used for writing query to a table: (multipartIdentifier, partitionKeys, ifPartitionNotExists).
-
type
TableClauses = (Seq[Transform], Option[BucketSpec], Map[String, String], Map[String, String], Option[String], Option[String])
Type to keep track of table clauses: (partitioning, bucketSpec, properties, options, location, comment).
-
type
TableHeader = (Seq[String], Boolean, Boolean, Boolean)
Type to keep track of a table header: (identifier, isTemporary, ifNotExists, isExternal).
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
aggregateResult(arg0: AnyRef, arg1: AnyRef): AnyRef
- Attributes
- protected[tree]
- Definition Classes
- AbstractParseTreeVisitor
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cleanTableOptions(ctx: ParserRuleContext, options: Map[String, String], location: Option[String]): (Map[String, String], Option[String])
- def cleanTableProperties(ctx: ParserRuleContext, properties: Map[String, String]): Map[String, String]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
createSchema(ctx: ColTypeListContext): StructType
Create top level table schema.
Create top level table schema.
- Attributes
- protected
-
def
createStructType(ctx: ComplexColTypeListContext): StructType
Create a StructType from a sequence of StructFields.
Create a StructType from a sequence of StructFields.
- Attributes
- protected
-
def
defaultResult(): AnyRef
- Attributes
- protected[tree]
- Definition Classes
- AbstractParseTreeVisitor
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
expression(ctx: ParserRuleContext): Expression
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).
- Attributes
- protected
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getFunctionIdentifier(ctx: FunctionNameContext): FunctionIdentifier
Get a function identifier consist by database (optional) and name.
Get a function identifier consist by database (optional) and name.
- Attributes
- protected
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
-
def
log: Logger
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logDebug(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logError(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logInfo(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logName: String
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logTrace(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
def
logWarning(msg: ⇒ String): Unit
- Attributes
- protected
- Definition Classes
- Logging
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def parseRawDataType(ctx: SingleDataTypeContext): DataType
-
def
plan(tree: ParserRuleContext): LogicalPlan
- Attributes
- protected
-
def
shouldVisitNextChild(arg0: RuleNode, arg1: AnyRef): Boolean
- Attributes
- protected[tree]
- Definition Classes
- AbstractParseTreeVisitor
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
typedVisit[T](ctx: ParseTree): T
- Attributes
- protected
-
def
visit(arg0: ParseTree): AnyRef
- Definition Classes
- AbstractParseTreeVisitor → ParseTreeVisitor
-
def
visitAddTableColumns(ctx: AddTableColumnsContext): LogicalPlan
Parse a AlterTableAddColumnsStatement command.
Parse a AlterTableAddColumnsStatement command.
For example:
ALTER TABLE table1 ADD COLUMNS (col_name data_type [COMMENT col_comment], ...);
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitAddTablePartition(ctx: AddTablePartitionContext): LogicalPlan
Create an AlterTableAddPartitionStatement.
Create an AlterTableAddPartitionStatement.
For example:
ALTER TABLE multi_part_name ADD [IF NOT EXISTS] PARTITION spec [LOCATION 'loc1'] ALTER VIEW multi_part_name ADD [IF NOT EXISTS] PARTITION specALTER VIEW ... ADD PARTITION ... is not supported because the concept of partitioning is associated with physical tables
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitAggregationClause(ctx: AggregationClauseContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#aggregationClause.Visit a parse tree produced by
SqlBaseParser#aggregationClause.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitAliasedQuery(ctx: AliasedQueryContext): LogicalPlan
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. We could add alias names for output columns, for example:
SELECT col1, col2 FROM testData AS t(col1, col2)
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitAliasedRelation(ctx: AliasedRelationContext): LogicalPlan
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. We could add alias names for output columns, for example:
SELECT a, b, c, d FROM (src1 s1 INNER JOIN src2 s2 ON s1.id = s2.id) dst(a, b, c, d)
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitAlterColumnAction(ctx: AlterColumnActionContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#alterColumnAction.Visit a parse tree produced by
SqlBaseParser#alterColumnAction.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitAlterTableAlterColumn(ctx: AlterTableAlterColumnContext): LogicalPlan
Parse a AlterTableAlterColumnStatement command to alter a column's property.
Parse a AlterTableAlterColumnStatement command to alter a column's property.
For example:
ALTER TABLE table1 ALTER COLUMN a.b.c TYPE bigint ALTER TABLE table1 ALTER COLUMN a.b.c SET NOT NULL ALTER TABLE table1 ALTER COLUMN a.b.c DROP NOT NULL ALTER TABLE table1 ALTER COLUMN a.b.c COMMENT 'new comment' ALTER TABLE table1 ALTER COLUMN a.b.c FIRST ALTER TABLE table1 ALTER COLUMN a.b.c AFTER x- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitAlterViewQuery(ctx: AlterViewQueryContext): LogicalPlan
Alter the query of a view.
Alter the query of a view. This creates a AlterViewAsStatement
For example:
ALTER VIEW multi_part_name AS SELECT ...;
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitAnalyze(ctx: AnalyzeContext): LogicalPlan
Create an AnalyzeTableStatement, or an AnalyzeColumnStatement.
Create an AnalyzeTableStatement, or an AnalyzeColumnStatement. Example SQL for analyzing a table or a set of partitions :
ANALYZE TABLE multi_part_name [PARTITION (partcol1[=val1], partcol2[=val2], ...)] COMPUTE STATISTICS [NOSCAN];
Example SQL for analyzing columns :
ANALYZE TABLE multi_part_name COMPUTE STATISTICS FOR COLUMNS column1, column2;
Example SQL for analyzing all columns of a table:
ANALYZE TABLE multi_part_name COMPUTE STATISTICS FOR ALL COLUMNS;
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitAnsiNonReserved(ctx: AnsiNonReservedContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#ansiNonReserved.Visit a parse tree produced by
SqlBaseParser#ansiNonReserved.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitApplyTransform(ctx: ApplyTransformContext): AnyRef
Visit a parse tree produced by the
applyTransformlabeled alternative inSqlBaseParser#transform.Visit a parse tree produced by the
applyTransformlabeled alternative inSqlBaseParser#transform.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitArithmeticBinary(ctx: ArithmeticBinaryContext): Expression
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: '|'
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitArithmeticOperator(ctx: ArithmeticOperatorContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#arithmeticOperator.Visit a parse tree produced by
SqlBaseParser#arithmeticOperator.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitArithmeticUnary(ctx: ArithmeticUnaryContext): Expression
Create a unary arithmetic expression.
Create a unary arithmetic expression. The following arithmetic operators are supported: - Plus: '+' - Minus: '-' - Bitwise Not: '~'
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitAssignment(ctx: AssignmentContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#assignment.Visit a parse tree produced by
SqlBaseParser#assignment.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitAssignmentList(ctx: AssignmentListContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#assignmentList.Visit a parse tree produced by
SqlBaseParser#assignmentList.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitBigDecimalLiteral(ctx: BigDecimalLiteralContext): Literal
Create a BigDecimal Literal expression.
Create a BigDecimal Literal expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitBigIntLiteral(ctx: BigIntLiteralContext): Literal
Create a Long Literal expression.
Create a Long Literal expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitBooleanLiteral(ctx: BooleanLiteralContext): Literal
Create a Boolean literal expression.
Create a Boolean literal expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitBooleanValue(ctx: BooleanValueContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#booleanValue.Visit a parse tree produced by
SqlBaseParser#booleanValue.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitBucketSpec(ctx: BucketSpecContext): BucketSpec
Create a BucketSpec.
Create a BucketSpec.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCacheTable(ctx: CacheTableContext): LogicalPlan
Create a CacheTableStatement.
Create a CacheTableStatement.
For example:
CACHE [LAZY] TABLE multi_part_name [OPTIONS tablePropertyList] [[AS] query]
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCast(ctx: CastContext): Expression
Create a Cast expression.
Create a Cast expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitChildren(node: RuleNode): AnyRef
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.
- Definition Classes
- AstBuilder → AbstractParseTreeVisitor → ParseTreeVisitor
-
def
visitClearCache(ctx: ClearCacheContext): AnyRef
Visit a parse tree produced by the
clearCachelabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
clearCachelabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitColPosition(ctx: ColPositionContext): ColumnPosition
Visit a parse tree produced by
SqlBaseParser#colPosition.Visit a parse tree produced by
SqlBaseParser#colPosition.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitColType(ctx: ColTypeContext): StructField
Create a top level StructField from a column definition.
Create a top level StructField from a column definition.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitColTypeList(ctx: ColTypeListContext): Seq[StructField]
Create a StructType from a number of column definitions.
Create a StructType from a number of column definitions.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitColumnReference(ctx: ColumnReferenceContext): Expression
Create an UnresolvedAttribute expression or a UnresolvedRegex if it is a regex quoted in
Create an UnresolvedAttribute expression or a UnresolvedRegex if it is a regex quoted in
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCommentNamespace(ctx: CommentNamespaceContext): LogicalPlan
Visit a parse tree produced by the
commentNamespacelabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
commentNamespacelabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCommentSpec(ctx: CommentSpecContext): String
Create a comment string.
Create a comment string.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCommentSpecList(ctx: List[CommentSpecContext]): Option[String]
Create an optional comment string.
Create an optional comment string.
- Attributes
- protected
-
def
visitCommentTable(ctx: CommentTableContext): LogicalPlan
Visit a parse tree produced by the
commentTablelabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
commentTablelabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitComparison(ctx: ComparisonContext): 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: '>='
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitComparisonOperator(ctx: ComparisonOperatorContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#comparisonOperator.Visit a parse tree produced by
SqlBaseParser#comparisonOperator.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitComplexColType(ctx: ComplexColTypeContext): StructField
Create a StructField from a column definition.
Create a StructField from a column definition.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitComplexColTypeList(ctx: ComplexColTypeListContext): Seq[StructField]
Create a StructType from a number of column definitions.
Create a StructType from a number of column definitions.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitComplexDataType(ctx: ComplexDataTypeContext): DataType
Create a complex DataType.
Create a complex DataType. Arrays, Maps and Structures are supported.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitConstantDefault(ctx: ConstantDefaultContext): AnyRef
Visit a parse tree produced by the
constantDefaultlabeled alternative inSqlBaseParser#primaryExpression.Visit a parse tree produced by the
constantDefaultlabeled alternative inSqlBaseParser#primaryExpression.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitConstantList(ctx: ConstantListContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#constantList.Visit a parse tree produced by
SqlBaseParser#constantList.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCreateFileFormat(ctx: CreateFileFormatContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#createFileFormat.Visit a parse tree produced by
SqlBaseParser#createFileFormat.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCreateFunction(ctx: CreateFunctionContext): LogicalPlan
Create a CREATE FUNCTION statement.
Create a CREATE FUNCTION statement.
For example:
CREATE [OR REPLACE] [TEMPORARY] FUNCTION [IF NOT EXISTS] [db_name.]function_name AS class_name [USING JAR|FILE|ARCHIVE 'file_uri' [, JAR|FILE|ARCHIVE 'file_uri']];- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCreateHiveTable(ctx: CreateHiveTableContext): AnyRef
Visit a parse tree produced by the
createHiveTablelabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
createHiveTablelabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCreateNamespace(ctx: CreateNamespaceContext): LogicalPlan
Create a CreateNamespaceStatement command.
Create a CreateNamespaceStatement command.
For example:
CREATE NAMESPACE [IF NOT EXISTS] ns1.ns2.ns3 create_namespace_clauses; create_namespace_clauses (order insensitive): [COMMENT namespace_comment] [LOCATION path] [WITH PROPERTIES (key1=val1, key2=val2, ...)]
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCreateTable(ctx: CreateTableContext): LogicalPlan
Create a table, returning a CreateTableStatement logical plan.
Create a table, returning a CreateTableStatement logical plan.
Expected format:
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] [db_name.]table_name USING table_provider create_table_clauses [[AS] select_statement]; create_table_clauses (order insensitive): [OPTIONS table_property_list] [PARTITIONED BY (col_name, transform(col_name), transform(constant, col_name), ...)] [CLUSTERED BY (col_name, col_name, ...) [SORTED BY (col_name [ASC|DESC], ...)] INTO num_buckets BUCKETS ] [LOCATION path] [COMMENT table_comment] [TBLPROPERTIES (property_name=property_value, ...)]- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCreateTableClauses(ctx: CreateTableClausesContext): TableClauses
Visit a parse tree produced by
SqlBaseParser#createTableClauses.Visit a parse tree produced by
SqlBaseParser#createTableClauses.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCreateTableHeader(ctx: CreateTableHeaderContext): TableHeader
Validate a create table statement and return the TableIdentifier.
Validate a create table statement and return the TableIdentifier.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCreateTableLike(ctx: CreateTableLikeContext): AnyRef
Visit a parse tree produced by the
createTableLikelabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
createTableLikelabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCreateTempViewUsing(ctx: CreateTempViewUsingContext): AnyRef
Visit a parse tree produced by the
createTempViewUsinglabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
createTempViewUsinglabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCreateView(ctx: CreateViewContext): LogicalPlan
Create or replace a view.
Create or replace a view. This creates a CreateViewStatement
For example:
CREATE [OR REPLACE] [[GLOBAL] TEMPORARY] VIEW [IF NOT EXISTS] multi_part_name [(column_name [COMMENT column_comment], ...) ] create_view_clauses AS SELECT ...; create_view_clauses (order insensitive): [COMMENT view_comment] [TBLPROPERTIES (property_name = property_value, ...)]
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCtes(ctx: CtesContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#ctes.Visit a parse tree produced by
SqlBaseParser#ctes.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitCurrentDatetime(ctx: CurrentDatetimeContext): Expression
Visit a parse tree produced by the
currentDatetimelabeled alternative inSqlBaseParser#primaryExpression.Visit a parse tree produced by the
currentDatetimelabeled alternative inSqlBaseParser#primaryExpression.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDecimalLiteral(ctx: DecimalLiteralContext): Literal
Create a decimal literal for a regular decimal number.
Create a decimal literal for a regular decimal number.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDeleteFromTable(ctx: DeleteFromTableContext): LogicalPlan
Visit a parse tree produced by the
deleteFromTablelabeled alternative inSqlBaseParser#dmlStatementNoWith.Visit a parse tree produced by the
deleteFromTablelabeled alternative inSqlBaseParser#dmlStatementNoWith.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDereference(ctx: DereferenceContext): Expression
Create a dereference expression.
Create a dereference expression. The return type depends on the type of the parent. If the parent is an UnresolvedAttribute, it can be a UnresolvedAttribute or a UnresolvedRegex for regex quoted in
; if the parent is some other expression, it can be UnresolvedExtractValue.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDescribeColName(ctx: DescribeColNameContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#describeColName.Visit a parse tree produced by
SqlBaseParser#describeColName.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDescribeFuncName(ctx: DescribeFuncNameContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#describeFuncName.Visit a parse tree produced by
SqlBaseParser#describeFuncName.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDescribeFunction(ctx: DescribeFunctionContext): LogicalPlan
Create a plan for a DESCRIBE FUNCTION statement.
Create a plan for a DESCRIBE FUNCTION statement.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDescribeNamespace(ctx: DescribeNamespaceContext): LogicalPlan
Create a DescribeNamespace.
Create a DescribeNamespace.
For example:
DESCRIBE (DATABASE|SCHEMA|NAMESPACE) [EXTENDED] database;
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDescribeQuery(ctx: DescribeQueryContext): AnyRef
Visit a parse tree produced by the
describeQuerylabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
describeQuerylabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDescribeRelation(ctx: DescribeRelationContext): LogicalPlan
Create a DescribeColumnStatement or DescribeRelation commands.
Create a DescribeColumnStatement or DescribeRelation commands.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDmlStatement(ctx: DmlStatementContext): AnyRef
Visit a parse tree produced by the
dmlStatementlabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
dmlStatementlabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDoubleLiteral(ctx: DoubleLiteralContext): Literal
Create a Double Literal expression.
Create a Double Literal expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDropFunction(ctx: DropFunctionContext): LogicalPlan
Create a DROP FUNCTION statement.
Create a DROP FUNCTION statement.
For example:
DROP [TEMPORARY] FUNCTION [IF EXISTS] function;
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDropNamespace(ctx: DropNamespaceContext): LogicalPlan
Create a DropNamespace command.
Create a DropNamespace command.
For example:
DROP (DATABASE|SCHEMA|NAMESPACE) [IF EXISTS] ns1.ns2 [RESTRICT|CASCADE];
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDropTable(ctx: DropTableContext): LogicalPlan
Create a DropTableStatement command.
Create a DropTableStatement command.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDropTableColumns(ctx: DropTableColumnsContext): LogicalPlan
Parse a AlterTableDropColumnsStatement command.
Parse a AlterTableDropColumnsStatement command.
For example:
ALTER TABLE table1 DROP COLUMN a.b.c ALTER TABLE table1 DROP COLUMNS a.b.c, x, y
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDropTablePartitions(ctx: DropTablePartitionsContext): LogicalPlan
Create an AlterTableDropPartitionStatement
Create an AlterTableDropPartitionStatement
For example:
ALTER TABLE multi_part_name DROP [IF EXISTS] PARTITION spec1[, PARTITION spec2, ...] [PURGE]; ALTER VIEW view DROP [IF EXISTS] PARTITION spec1[, PARTITION spec2, ...];
ALTER VIEW ... DROP PARTITION ... is not supported because the concept of partitioning is associated with physical tables
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitDropView(ctx: DropViewContext): AnyRef
Create a DropViewStatement command.
Create a DropViewStatement command.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitErrorCapturingIdentifier(ctx: ErrorCapturingIdentifierContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#errorCapturingIdentifier.Visit a parse tree produced by
SqlBaseParser#errorCapturingIdentifier.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitErrorCapturingMultiUnitsInterval(ctx: ErrorCapturingMultiUnitsIntervalContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#errorCapturingMultiUnitsInterval.Visit a parse tree produced by
SqlBaseParser#errorCapturingMultiUnitsInterval.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitErrorCapturingUnitToUnitInterval(ctx: ErrorCapturingUnitToUnitIntervalContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#errorCapturingUnitToUnitInterval.Visit a parse tree produced by
SqlBaseParser#errorCapturingUnitToUnitInterval.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitErrorIdent(ctx: ErrorIdentContext): AnyRef
Visit a parse tree produced by the
errorIdentlabeled alternative inSqlBaseParser#errorCapturingIdentifierExtra.Visit a parse tree produced by the
errorIdentlabeled alternative inSqlBaseParser#errorCapturingIdentifierExtra.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitErrorNode(arg0: ErrorNode): AnyRef
- Definition Classes
- AbstractParseTreeVisitor → ParseTreeVisitor
-
def
visitExists(ctx: ExistsContext): Expression
Create a filtering correlated sub-query (EXISTS).
Create a filtering correlated sub-query (EXISTS).
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitExplain(ctx: ExplainContext): AnyRef
Visit a parse tree produced by the
explainlabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
explainlabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitExponentLiteral(ctx: ExponentLiteralContext): Literal
Create a double literal for number with an exponent, e.g.
Create a double literal for number with an exponent, e.g. 1E-30
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitExpression(ctx: ExpressionContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#expression.Visit a parse tree produced by
SqlBaseParser#expression.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitExtract(ctx: ExtractContext): Expression
Create a Extract expression.
Create a Extract expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitFailNativeCommand(ctx: FailNativeCommandContext): AnyRef
Visit a parse tree produced by the
failNativeCommandlabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
failNativeCommandlabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitFirst(ctx: FirstContext): Expression
Create a First expression.
Create a First expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitFrameBound(ctx: FrameBoundContext): Expression
Create or resolve a frame boundary expressions.
Create or resolve a frame boundary expressions.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitFromClause(ctx: FromClauseContext): LogicalPlan
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.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitFromStatement(ctx: FromStatementContext): LogicalPlan
Visit a parse tree produced by
SqlBaseParser#fromStatement.Visit a parse tree produced by
SqlBaseParser#fromStatement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitFromStatementBody(ctx: FromStatementBodyContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#fromStatementBody.Visit a parse tree produced by
SqlBaseParser#fromStatementBody.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitFromStmt(ctx: FromStmtContext): AnyRef
Visit a parse tree produced by the
fromStmtlabeled alternative inSqlBaseParser#queryPrimary.Visit a parse tree produced by the
fromStmtlabeled alternative inSqlBaseParser#queryPrimary.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitFunctionCall(ctx: FunctionCallContext): Expression
Create a (windowed) Function expression.
Create a (windowed) Function expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitFunctionIdentifier(ctx: FunctionIdentifierContext): FunctionIdentifier
Create a FunctionIdentifier from a 'functionName' or 'databaseName'.'functionName' pattern.
Create a FunctionIdentifier from a 'functionName' or 'databaseName'.'functionName' pattern.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitFunctionName(ctx: QualifiedNameContext): FunctionIdentifier
Create a function database (optional) and name pair.
Create a function database (optional) and name pair.
- Attributes
- protected
-
def
visitFunctionName(ctx: MultipartIdentifierContext): FunctionIdentifier
Create a function database (optional) and name pair, for multipartIdentifier.
Create a function database (optional) and name pair, for multipartIdentifier. This is used in CREATE FUNCTION, DROP FUNCTION, SHOWFUNCTIONS.
- Attributes
- protected
-
def
visitFunctionName(ctx: FunctionNameContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#functionName.Visit a parse tree produced by
SqlBaseParser#functionName.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitFunctionTable(ctx: FunctionTableContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#functionTable.Visit a parse tree produced by
SqlBaseParser#functionTable.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitGenericFileFormat(ctx: GenericFileFormatContext): AnyRef
Visit a parse tree produced by the
genericFileFormatlabeled alternative inSqlBaseParser#fileFormat.Visit a parse tree produced by the
genericFileFormatlabeled alternative inSqlBaseParser#fileFormat.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitGroupingSet(ctx: GroupingSetContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#groupingSet.Visit a parse tree produced by
SqlBaseParser#groupingSet.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitHavingClause(ctx: HavingClauseContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#havingClause.Visit a parse tree produced by
SqlBaseParser#havingClause.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitHint(ctx: HintContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#hint.Visit a parse tree produced by
SqlBaseParser#hint.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitHintStatement(ctx: HintStatementContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#hintStatement.Visit a parse tree produced by
SqlBaseParser#hintStatement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitHiveChangeColumn(ctx: HiveChangeColumnContext): LogicalPlan
Parse a AlterTableAlterColumnStatement command.
Parse a AlterTableAlterColumnStatement command. This is Hive SQL syntax.
For example:
ALTER TABLE table [PARTITION partition_spec] CHANGE [COLUMN] column_old_name column_new_name column_dataType [COMMENT column_comment] [FIRST | AFTER column_name];
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitIdentifier(ctx: IdentifierContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#identifier.Visit a parse tree produced by
SqlBaseParser#identifier.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitIdentifierComment(ctx: IdentifierCommentContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#identifierComment.Visit a parse tree produced by
SqlBaseParser#identifierComment.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitIdentifierCommentList(ctx: IdentifierCommentListContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#identifierCommentList.Visit a parse tree produced by
SqlBaseParser#identifierCommentList.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitIdentifierList(ctx: IdentifierListContext): Seq[String]
Create a Sequence of Strings for a parenthesis enclosed alias list.
Create a Sequence of Strings for a parenthesis enclosed alias list.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitIdentifierSeq(ctx: IdentifierSeqContext): Seq[String]
Create a Sequence of Strings for an identifier list.
Create a Sequence of Strings for an identifier list.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitIdentityTransform(ctx: IdentityTransformContext): AnyRef
Visit a parse tree produced by the
identityTransformlabeled alternative inSqlBaseParser#transform.Visit a parse tree produced by the
identityTransformlabeled alternative inSqlBaseParser#transform.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitInlineTable(ctx: InlineTableContext): LogicalPlan
Create an inline table (a virtual table in Hive parlance).
Create an inline table (a virtual table in Hive parlance).
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitInlineTableDefault1(ctx: InlineTableDefault1Context): AnyRef
Visit a parse tree produced by the
inlineTableDefault1labeled alternative inSqlBaseParser#queryPrimary.Visit a parse tree produced by the
inlineTableDefault1labeled alternative inSqlBaseParser#queryPrimary.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitInlineTableDefault2(ctx: InlineTableDefault2Context): AnyRef
Visit a parse tree produced by the
inlineTableDefault2labeled alternative inSqlBaseParser#relationPrimary.Visit a parse tree produced by the
inlineTableDefault2labeled alternative inSqlBaseParser#relationPrimary.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitInsertIntoTable(ctx: InsertIntoTableContext): InsertTableParams
Add an INSERT INTO TABLE operation to the logical plan.
Add an INSERT INTO TABLE operation to the logical plan.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitInsertOverwriteDir(ctx: InsertOverwriteDirContext): InsertDirParams
Write to a directory, returning a InsertIntoDir logical plan.
Write to a directory, returning a InsertIntoDir logical plan.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitInsertOverwriteHiveDir(ctx: InsertOverwriteHiveDirContext): InsertDirParams
Write to a directory, returning a InsertIntoDir logical plan.
Write to a directory, returning a InsertIntoDir logical plan.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitInsertOverwriteTable(ctx: InsertOverwriteTableContext): InsertTableParams
Add an INSERT OVERWRITE TABLE operation to the logical plan.
Add an INSERT OVERWRITE TABLE operation to the logical plan.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitIntegerLiteral(ctx: IntegerLiteralContext): Literal
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.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitInterval(ctx: IntervalContext): Literal
Create a CalendarInterval literal expression.
Create a CalendarInterval literal expression. Two syntaxes are supported: - multiple unit value pairs, for instance: interval 2 months 2 days. - from-to unit, for instance: interval '1-2' year to month.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitIntervalLiteral(ctx: IntervalLiteralContext): AnyRef
Visit a parse tree produced by the
intervalLiterallabeled alternative inSqlBaseParser#constant.Visit a parse tree produced by the
intervalLiterallabeled alternative inSqlBaseParser#constant.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitIntervalUnit(ctx: IntervalUnitContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#intervalUnit.Visit a parse tree produced by
SqlBaseParser#intervalUnit.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitIntervalValue(ctx: IntervalValueContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#intervalValue.Visit a parse tree produced by
SqlBaseParser#intervalValue.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitJoinCriteria(ctx: JoinCriteriaContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#joinCriteria.Visit a parse tree produced by
SqlBaseParser#joinCriteria.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitJoinRelation(ctx: JoinRelationContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#joinRelation.Visit a parse tree produced by
SqlBaseParser#joinRelation.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitJoinType(ctx: JoinTypeContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#joinType.Visit a parse tree produced by
SqlBaseParser#joinType.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitLambda(ctx: LambdaContext): Expression
Create an LambdaFunction.
Create an LambdaFunction.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitLast(ctx: LastContext): Expression
Create a Last expression.
Create a Last expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitLateralView(ctx: LateralViewContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#lateralView.Visit a parse tree produced by
SqlBaseParser#lateralView.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitLegacyDecimalLiteral(ctx: LegacyDecimalLiteralContext): Literal
Create a decimal literal for a regular decimal number or a scientific decimal number.
Create a decimal literal for a regular decimal number or a scientific decimal number.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitLoadData(ctx: LoadDataContext): LogicalPlan
Create a LoadDataStatement.
Create a LoadDataStatement.
For example:
LOAD DATA [LOCAL] INPATH 'filepath' [OVERWRITE] INTO TABLE multi_part_name [PARTITION (partcol1=val1, partcol2=val2 ...)]
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitLocationSpec(ctx: LocationSpecContext): String
Create a location string.
Create a location string.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitLocationSpecList(ctx: List[LocationSpecContext]): Option[String]
Create an optional location string.
Create an optional location string.
- Attributes
- protected
-
def
visitLogicalBinary(ctx: LogicalBinaryContext): Expression
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.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitLogicalNot(ctx: LogicalNotContext): Expression
Invert a boolean expression.
Invert a boolean expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitManageResource(ctx: ManageResourceContext): AnyRef
Visit a parse tree produced by the
manageResourcelabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
manageResourcelabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitMatchedAction(ctx: MatchedActionContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#matchedAction.Visit a parse tree produced by
SqlBaseParser#matchedAction.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitMatchedClause(ctx: MatchedClauseContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#matchedClause.Visit a parse tree produced by
SqlBaseParser#matchedClause.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitMergeIntoTable(ctx: MergeIntoTableContext): LogicalPlan
Visit a parse tree produced by the
mergeIntoTablelabeled alternative inSqlBaseParser#dmlStatementNoWith.Visit a parse tree produced by the
mergeIntoTablelabeled alternative inSqlBaseParser#dmlStatementNoWith.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitMultiInsertQuery(ctx: MultiInsertQueryContext): LogicalPlan
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.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitMultiInsertQueryBody(ctx: MultiInsertQueryBodyContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#multiInsertQueryBody.Visit a parse tree produced by
SqlBaseParser#multiInsertQueryBody.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitMultiUnitsInterval(ctx: MultiUnitsIntervalContext): CalendarInterval
Creates a CalendarInterval with multiple unit value pairs, e.g.
Creates a CalendarInterval with multiple unit value pairs, e.g. 1 YEAR 2 DAYS.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitMultipartIdentifier(ctx: MultipartIdentifierContext): Seq[String]
Create a multi-part identifier.
Create a multi-part identifier.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitMultipartIdentifierList(ctx: MultipartIdentifierListContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#multipartIdentifierList.Visit a parse tree produced by
SqlBaseParser#multipartIdentifierList.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitNamedExpression(ctx: NamedExpressionContext): Expression
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.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitNamedExpressionSeq(ctx: NamedExpressionSeqContext): Seq[Expression]
Visit a parse tree produced by
SqlBaseParser#namedExpressionSeq.Visit a parse tree produced by
SqlBaseParser#namedExpressionSeq.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitNamedQuery(ctx: NamedQueryContext): SubqueryAlias
Create a named logical plan.
Create a named logical plan.
This is only used for Common Table Expressions.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitNamedWindow(ctx: NamedWindowContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#namedWindow.Visit a parse tree produced by
SqlBaseParser#namedWindow.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitNamespace(ctx: NamespaceContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#namespace.Visit a parse tree produced by
SqlBaseParser#namespace.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitNestedConstantList(ctx: NestedConstantListContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#nestedConstantList.Visit a parse tree produced by
SqlBaseParser#nestedConstantList.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitNonOptionalPartitionSpec(ctx: PartitionSpecContext): Map[String, String]
Create a partition specification map without optional values.
Create a partition specification map without optional values.
- Attributes
- protected
-
def
visitNonReserved(ctx: NonReservedContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#nonReserved.Visit a parse tree produced by
SqlBaseParser#nonReserved.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitNotMatchedAction(ctx: NotMatchedActionContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#notMatchedAction.Visit a parse tree produced by
SqlBaseParser#notMatchedAction.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitNotMatchedClause(ctx: NotMatchedClauseContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#notMatchedClause.Visit a parse tree produced by
SqlBaseParser#notMatchedClause.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitNullLiteral(ctx: NullLiteralContext): Literal
Create a NULL literal expression.
Create a NULL literal expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitNumericLiteral(ctx: NumericLiteralContext): AnyRef
Visit a parse tree produced by the
numericLiterallabeled alternative inSqlBaseParser#constant.Visit a parse tree produced by the
numericLiterallabeled alternative inSqlBaseParser#constant.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitOrderedIdentifier(ctx: OrderedIdentifierContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#orderedIdentifier.Visit a parse tree produced by
SqlBaseParser#orderedIdentifier.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitOrderedIdentifierList(ctx: OrderedIdentifierListContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#orderedIdentifierList.Visit a parse tree produced by
SqlBaseParser#orderedIdentifierList.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitOverlay(ctx: OverlayContext): Expression
Create a Overlay expression.
Create a Overlay expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitParenthesizedExpression(ctx: ParenthesizedExpressionContext): 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.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPartitionSpec(ctx: PartitionSpecContext): Map[String, Option[String]]
Create a partition specification map.
Create a partition specification map.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPartitionSpecLocation(ctx: PartitionSpecLocationContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#partitionSpecLocation.Visit a parse tree produced by
SqlBaseParser#partitionSpecLocation.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPartitionVal(ctx: PartitionValContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#partitionVal.Visit a parse tree produced by
SqlBaseParser#partitionVal.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPivotClause(ctx: PivotClauseContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#pivotClause.Visit a parse tree produced by
SqlBaseParser#pivotClause.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPivotColumn(ctx: PivotColumnContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#pivotColumn.Visit a parse tree produced by
SqlBaseParser#pivotColumn.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPivotValue(ctx: PivotValueContext): Expression
Create a Pivot column value with or without an alias.
Create a Pivot column value with or without an alias.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPosition(ctx: PositionContext): Expression
Create a Position expression.
Create a Position expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPredicate(ctx: PredicateContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#predicate.Visit a parse tree produced by
SqlBaseParser#predicate.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPredicateOperator(ctx: PredicateOperatorContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#predicateOperator.Visit a parse tree produced by
SqlBaseParser#predicateOperator.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPredicated(ctx: PredicatedContext): Expression
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- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPrimitiveDataType(ctx: PrimitiveDataTypeContext): DataType
Resolve/create a primitive type.
Resolve/create a primitive type.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitPropertyKeyValues(ctx: TablePropertyListContext): Map[String, String]
Parse a key-value map from a TablePropertyListContext, assuming all values are specified.
-
def
visitPropertyKeys(ctx: TablePropertyListContext): Seq[String]
Parse a list of keys from a TablePropertyListContext, assuming no values are specified.
-
def
visitQualifiedColTypeWithPosition(ctx: QualifiedColTypeWithPositionContext): QualifiedColType
Parse new column info from ADD COLUMN into a QualifiedColType.
Parse new column info from ADD COLUMN into a QualifiedColType.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitQualifiedColTypeWithPositionList(ctx: QualifiedColTypeWithPositionListContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#qualifiedColTypeWithPositionList.Visit a parse tree produced by
SqlBaseParser#qualifiedColTypeWithPositionList.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitQualifiedName(ctx: QualifiedNameContext): Seq[String]
Parse a qualified name to a multipart name.
Parse a qualified name to a multipart name.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitQualifiedNameList(ctx: QualifiedNameListContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#qualifiedNameList.Visit a parse tree produced by
SqlBaseParser#qualifiedNameList.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitQuery(ctx: QueryContext): LogicalPlan
Create a top-level plan with Common Table Expressions.
Create a top-level plan with Common Table Expressions.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitQueryOrganization(ctx: QueryOrganizationContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#queryOrganization.Visit a parse tree produced by
SqlBaseParser#queryOrganization.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitQueryPrimaryDefault(ctx: QueryPrimaryDefaultContext): AnyRef
Visit a parse tree produced by the
queryPrimaryDefaultlabeled alternative inSqlBaseParser#queryPrimary.Visit a parse tree produced by the
queryPrimaryDefaultlabeled alternative inSqlBaseParser#queryPrimary.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitQueryTermDefault(ctx: QueryTermDefaultContext): AnyRef
Visit a parse tree produced by the
queryTermDefaultlabeled alternative inSqlBaseParser#queryTerm.Visit a parse tree produced by the
queryTermDefaultlabeled alternative inSqlBaseParser#queryTerm.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitQuotedIdentifier(ctx: QuotedIdentifierContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#quotedIdentifier.Visit a parse tree produced by
SqlBaseParser#quotedIdentifier.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitQuotedIdentifierAlternative(ctx: QuotedIdentifierAlternativeContext): AnyRef
Visit a parse tree produced by the
quotedIdentifierAlternativelabeled alternative inSqlBaseParser#strictIdentifier.Visit a parse tree produced by the
quotedIdentifierAlternativelabeled alternative inSqlBaseParser#strictIdentifier.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRealIdent(ctx: RealIdentContext): AnyRef
Visit a parse tree produced by the
realIdentlabeled alternative inSqlBaseParser#errorCapturingIdentifierExtra.Visit a parse tree produced by the
realIdentlabeled alternative inSqlBaseParser#errorCapturingIdentifierExtra.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRecoverPartitions(ctx: RecoverPartitionsContext): LogicalPlan
Create an AlterTableRecoverPartitionsStatement
Create an AlterTableRecoverPartitionsStatement
For example:
ALTER TABLE multi_part_name RECOVER PARTITIONS;
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRefreshResource(ctx: RefreshResourceContext): AnyRef
Visit a parse tree produced by the
refreshResourcelabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
refreshResourcelabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRefreshTable(ctx: RefreshTableContext): LogicalPlan
Create a RefreshTableStatement.
Create a RefreshTableStatement.
For example:
REFRESH TABLE multi_part_name
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRegularQuerySpecification(ctx: RegularQuerySpecificationContext): LogicalPlan
Visit a parse tree produced by the
regularQuerySpecificationlabeled alternative inSqlBaseParser#querySpecification.Visit a parse tree produced by the
regularQuerySpecificationlabeled alternative inSqlBaseParser#querySpecification.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRelation(ctx: RelationContext): LogicalPlan
Create a single relation referenced in a FROM clause.
Create a single relation referenced in a FROM clause. 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
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRenameTable(ctx: RenameTableContext): LogicalPlan
Create a RenameTableStatement command.
Create a RenameTableStatement command.
For example:
ALTER TABLE multi_part_name1 RENAME TO multi_part_name2; ALTER VIEW multi_part_name1 RENAME TO multi_part_name2;
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRenameTableColumn(ctx: RenameTableColumnContext): LogicalPlan
Parse a AlterTableRenameColumnStatement command.
Parse a AlterTableRenameColumnStatement command.
For example:
ALTER TABLE table1 RENAME COLUMN a.b.c TO x
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRenameTablePartition(ctx: RenameTablePartitionContext): LogicalPlan
Create an AlterTableRenamePartitionStatement
Create an AlterTableRenamePartitionStatement
For example:
ALTER TABLE multi_part_name PARTITION spec1 RENAME TO PARTITION spec2;
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRepairTable(ctx: RepairTableContext): LogicalPlan
Create a RepairTableStatement.
Create a RepairTableStatement.
For example:
MSCK REPAIR TABLE multi_part_name
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitReplaceTable(ctx: ReplaceTableContext): LogicalPlan
Replace a table, returning a ReplaceTableStatement logical plan.
Replace a table, returning a ReplaceTableStatement logical plan.
Expected format:
[CREATE OR] REPLACE TABLE [db_name.]table_name USING table_provider replace_table_clauses [[AS] select_statement]; replace_table_clauses (order insensitive): [OPTIONS table_property_list] [PARTITIONED BY (col_name, transform(col_name), transform(constant, col_name), ...)] [CLUSTERED BY (col_name, col_name, ...) [SORTED BY (col_name [ASC|DESC], ...)] INTO num_buckets BUCKETS ] [LOCATION path] [COMMENT table_comment] [TBLPROPERTIES (property_name=property_value, ...)]- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitReplaceTableHeader(ctx: ReplaceTableHeaderContext): TableHeader
Validate a replace table statement and return the TableIdentifier.
Validate a replace table statement and return the TableIdentifier.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitResetConfiguration(ctx: ResetConfigurationContext): AnyRef
Visit a parse tree produced by the
resetConfigurationlabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
resetConfigurationlabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitResource(ctx: ResourceContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#resource.Visit a parse tree produced by
SqlBaseParser#resource.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRowConstructor(ctx: RowConstructorContext): Expression
Create a CreateStruct expression.
Create a CreateStruct expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRowFormatDelimited(ctx: RowFormatDelimitedContext): AnyRef
Visit a parse tree produced by the
rowFormatDelimitedlabeled alternative inSqlBaseParser#rowFormat.Visit a parse tree produced by the
rowFormatDelimitedlabeled alternative inSqlBaseParser#rowFormat.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitRowFormatSerde(ctx: RowFormatSerdeContext): AnyRef
Visit a parse tree produced by the
rowFormatSerdelabeled alternative inSqlBaseParser#rowFormat.Visit a parse tree produced by the
rowFormatSerdelabeled alternative inSqlBaseParser#rowFormat.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSample(ctx: SampleContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#sample.Visit a parse tree produced by
SqlBaseParser#sample.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSampleByBucket(ctx: SampleByBucketContext): AnyRef
Visit a parse tree produced by the
sampleByBucketlabeled alternative inSqlBaseParser#sampleMethod.Visit a parse tree produced by the
sampleByBucketlabeled alternative inSqlBaseParser#sampleMethod.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSampleByBytes(ctx: SampleByBytesContext): AnyRef
Visit a parse tree produced by the
sampleByByteslabeled alternative inSqlBaseParser#sampleMethod.Visit a parse tree produced by the
sampleByByteslabeled alternative inSqlBaseParser#sampleMethod.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSampleByPercentile(ctx: SampleByPercentileContext): AnyRef
Visit a parse tree produced by the
sampleByPercentilelabeled alternative inSqlBaseParser#sampleMethod.Visit a parse tree produced by the
sampleByPercentilelabeled alternative inSqlBaseParser#sampleMethod.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSampleByRows(ctx: SampleByRowsContext): AnyRef
Visit a parse tree produced by the
sampleByRowslabeled alternative inSqlBaseParser#sampleMethod.Visit a parse tree produced by the
sampleByRowslabeled alternative inSqlBaseParser#sampleMethod.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSearchedCase(ctx: SearchedCaseContext): 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
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSelectClause(ctx: SelectClauseContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#selectClause.Visit a parse tree produced by
SqlBaseParser#selectClause.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSetClause(ctx: SetClauseContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#setClause.Visit a parse tree produced by
SqlBaseParser#setClause.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSetConfiguration(ctx: SetConfigurationContext): AnyRef
Visit a parse tree produced by the
setConfigurationlabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
setConfigurationlabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSetNamespaceLocation(ctx: SetNamespaceLocationContext): LogicalPlan
Create an AlterNamespaceSetLocation logical plan.
Create an AlterNamespaceSetLocation logical plan.
For example:
ALTER (DATABASE|SCHEMA|NAMESPACE) namespace SET LOCATION path;
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSetNamespaceProperties(ctx: SetNamespacePropertiesContext): LogicalPlan
Create an AlterNamespaceSetProperties logical plan.
Create an AlterNamespaceSetProperties logical plan.
For example:
ALTER (DATABASE|SCHEMA|NAMESPACE) database SET (DBPROPERTIES|PROPERTIES) (property_name=property_value, ...);
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSetOperation(ctx: SetOperationContext): LogicalPlan
Connect two queries by a Set operator.
Connect two queries by a Set operator.
Supported Set operators are: - UNION [ DISTINCT | ALL ] - EXCEPT [ DISTINCT | ALL ] - MINUS [ DISTINCT | ALL ] - INTERSECT [DISTINCT | ALL]
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSetQuantifier(ctx: SetQuantifierContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#setQuantifier.Visit a parse tree produced by
SqlBaseParser#setQuantifier.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSetTableLocation(ctx: SetTableLocationContext): LogicalPlan
Create an AlterTableSetLocationStatement command.
Create an AlterTableSetLocationStatement command.
For example:
ALTER TABLE table SET LOCATION "loc";- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSetTableProperties(ctx: SetTablePropertiesContext): LogicalPlan
Parse AlterViewSetPropertiesStatement or AlterTableSetPropertiesStatement commands.
Parse AlterViewSetPropertiesStatement or AlterTableSetPropertiesStatement commands.
For example:
ALTER TABLE table SET TBLPROPERTIES ('table_property' = 'property_value'); ALTER VIEW view SET TBLPROPERTIES ('table_property' = 'property_value');- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSetTableSerDe(ctx: SetTableSerDeContext): LogicalPlan
Create an AlterTableSerDePropertiesStatement
Create an AlterTableSerDePropertiesStatement
For example:
ALTER TABLE multi_part_name [PARTITION spec] SET SERDE serde_name [WITH SERDEPROPERTIES props]; ALTER TABLE multi_part_name [PARTITION spec] SET SERDEPROPERTIES serde_properties;
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitShowColumns(ctx: ShowColumnsContext): LogicalPlan
A command for users to list the column names for a table.
A command for users to list the column names for a table. This function creates a ShowColumnsStatement logical plan.
The syntax of using this command in SQL is:
SHOW COLUMNS (FROM | IN) tableName=multipartIdentifier ((FROM | IN) namespace=multipartIdentifier)?- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitShowCreateTable(ctx: ShowCreateTableContext): LogicalPlan
Creates a ShowCreateTableStatement
Creates a ShowCreateTableStatement
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitShowCurrentNamespace(ctx: ShowCurrentNamespaceContext): LogicalPlan
Create a ShowCurrentNamespaceStatement.
Create a ShowCurrentNamespaceStatement.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitShowFunctions(ctx: ShowFunctionsContext): LogicalPlan
Create a plan for a SHOW FUNCTIONS command.
Create a plan for a SHOW FUNCTIONS command.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitShowNamespaces(ctx: ShowNamespacesContext): LogicalPlan
Create a ShowNamespaces command.
Create a ShowNamespaces command.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitShowPartitions(ctx: ShowPartitionsContext): LogicalPlan
A command for users to list the partition names of a table.
A command for users to list the partition names of a table. If partition spec is specified, partitions that match the spec are returned. Otherwise an empty result set is returned.
This function creates a ShowPartitionsStatement logical plan
The syntax of using this command in SQL is:
SHOW PARTITIONS multi_part_name [partition_spec];
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitShowTable(ctx: ShowTableContext): LogicalPlan
Create a ShowTableStatement command.
Create a ShowTableStatement command.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitShowTables(ctx: ShowTablesContext): LogicalPlan
Create a ShowTables command.
Create a ShowTables command.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitShowTblProperties(ctx: ShowTblPropertiesContext): LogicalPlan
A command for users to list the properties for a table.
A command for users to list the properties for a table. If propertyKey is specified, the value for the propertyKey is returned. If propertyKey is not specified, all the keys and their corresponding values are returned. The syntax of using this command in SQL is:
SHOW TBLPROPERTIES multi_part_name[('propertyKey')];- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitShowViews(ctx: ShowViewsContext): LogicalPlan
Create a ShowViews command.
Create a ShowViews command.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSimpleCase(ctx: SimpleCaseContext): Expression
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
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSingleDataType(ctx: SingleDataTypeContext): DataType
Visit a parse tree produced by
SqlBaseParser#singleDataType.Visit a parse tree produced by
SqlBaseParser#singleDataType.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSingleExpression(ctx: SingleExpressionContext): Expression
Visit a parse tree produced by
SqlBaseParser#singleExpression.Visit a parse tree produced by
SqlBaseParser#singleExpression.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSingleFunctionIdentifier(ctx: SingleFunctionIdentifierContext): FunctionIdentifier
Visit a parse tree produced by
SqlBaseParser#singleFunctionIdentifier.Visit a parse tree produced by
SqlBaseParser#singleFunctionIdentifier.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSingleInsertQuery(ctx: SingleInsertQueryContext): LogicalPlan
Create a logical plan for a regular (single-insert) query.
Create a logical plan for a regular (single-insert) query.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSingleMultipartIdentifier(ctx: SingleMultipartIdentifierContext): Seq[String]
Visit a parse tree produced by
SqlBaseParser#singleMultipartIdentifier.Visit a parse tree produced by
SqlBaseParser#singleMultipartIdentifier.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSingleStatement(ctx: SingleStatementContext): LogicalPlan
Visit a parse tree produced by
SqlBaseParser#singleStatement.Visit a parse tree produced by
SqlBaseParser#singleStatement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSingleTableIdentifier(ctx: SingleTableIdentifierContext): TableIdentifier
Visit a parse tree produced by
SqlBaseParser#singleTableIdentifier.Visit a parse tree produced by
SqlBaseParser#singleTableIdentifier.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSingleTableSchema(ctx: SingleTableSchemaContext): StructType
Visit a parse tree produced by
SqlBaseParser#singleTableSchema.Visit a parse tree produced by
SqlBaseParser#singleTableSchema.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSkewSpec(ctx: SkewSpecContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#skewSpec.Visit a parse tree produced by
SqlBaseParser#skewSpec.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSmallIntLiteral(ctx: SmallIntLiteralContext): Literal
Create a Short Literal expression.
Create a Short Literal expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSortItem(ctx: SortItemContext): SortOrder
Create a SortOrder expression.
Create a SortOrder expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitStar(ctx: StarContext): Expression
Create a star (i.e.
Create a star (i.e. all) expression; this selects all elements (in the specified object). Both un-targeted (global) and targeted aliases are supported.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitStatementDefault(ctx: StatementDefaultContext): AnyRef
Visit a parse tree produced by the
statementDefaultlabeled alternative inSqlBaseParser#statement.Visit a parse tree produced by the
statementDefaultlabeled alternative inSqlBaseParser#statement.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitStorageHandler(ctx: StorageHandlerContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#storageHandler.Visit a parse tree produced by
SqlBaseParser#storageHandler.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitStrictNonReserved(ctx: StrictNonReservedContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#strictNonReserved.Visit a parse tree produced by
SqlBaseParser#strictNonReserved.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitStringConstant(ctx: ConstantContext): String
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.
- Attributes
- protected
-
def
visitStringLiteral(ctx: StringLiteralContext): Literal
Create a String literal expression.
Create a String literal expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitStruct(ctx: StructContext): Expression
Create a CreateStruct expression.
Create a CreateStruct expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSubquery(ctx: SubqueryContext): LogicalPlan
Create a logical plan for a sub-query.
Create a logical plan for a sub-query.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSubqueryExpression(ctx: SubqueryExpressionContext): Expression
Create a ScalarSubquery expression.
Create a ScalarSubquery expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSubscript(ctx: SubscriptContext): 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.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitSubstring(ctx: SubstringContext): Expression
Create a Substring/Substr expression.
Create a Substring/Substr expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTable(ctx: TableContext): LogicalPlan
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
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTableAlias(ctx: TableAliasContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#tableAlias.Visit a parse tree produced by
SqlBaseParser#tableAlias.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTableFileFormat(ctx: TableFileFormatContext): AnyRef
Visit a parse tree produced by the
tableFileFormatlabeled alternative inSqlBaseParser#fileFormat.Visit a parse tree produced by the
tableFileFormatlabeled alternative inSqlBaseParser#fileFormat.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTableIdentifier(ctx: TableIdentifierContext): TableIdentifier
Create a TableIdentifier from a 'tableName' or 'databaseName'.'tableName' pattern.
Create a TableIdentifier from a 'tableName' or 'databaseName'.'tableName' pattern.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTableName(ctx: TableNameContext): LogicalPlan
Create an aliased table reference.
Create an aliased table reference. This is typically used in FROM clauses.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTableProperty(ctx: TablePropertyContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#tableProperty.Visit a parse tree produced by
SqlBaseParser#tableProperty.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTablePropertyKey(key: TablePropertyKeyContext): String
A table property key can either be String or a collection of dot separated elements.
A table property key can either be String or a collection of dot separated elements. This function extracts the property key based on whether its a string literal or a table property identifier.
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTablePropertyList(ctx: TablePropertyListContext): Map[String, String]
Convert a table property list into a key-value map.
Convert a table property list into a key-value map. This should be called through visitPropertyKeyValues or visitPropertyKeys.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTablePropertyValue(value: TablePropertyValueContext): String
A table property value can be String, Integer, Boolean or Decimal.
A table property value can be String, Integer, Boolean or Decimal. This function extracts the property value based on whether its a string, integer, boolean or decimal literal.
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTableProvider(ctx: TableProviderContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#tableProvider.Visit a parse tree produced by
SqlBaseParser#tableProvider.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTableValuedFunction(ctx: TableValuedFunctionContext): LogicalPlan
Create a table-valued function call with arguments, e.g.
Create a table-valued function call with arguments, e.g. range(1000)
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTerminal(arg0: TerminalNode): AnyRef
- Definition Classes
- AbstractParseTreeVisitor → ParseTreeVisitor
-
def
visitTinyIntLiteral(ctx: TinyIntLiteralContext): Literal
Create a Byte Literal expression.
Create a Byte Literal expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTransformArgument(ctx: TransformArgumentContext): Expression
Parse an argument to a transform.
Parse an argument to a transform. An argument may be a field reference (qualified name) or a value literal.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTransformClause(ctx: TransformClauseContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#transformClause.Visit a parse tree produced by
SqlBaseParser#transformClause.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTransformList(ctx: TransformListContext): Seq[Transform]
Parse a list of transforms.
Parse a list of transforms.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTransformQuerySpecification(ctx: TransformQuerySpecificationContext): LogicalPlan
Visit a parse tree produced by the
transformQuerySpecificationlabeled alternative inSqlBaseParser#querySpecification.Visit a parse tree produced by the
transformQuerySpecificationlabeled alternative inSqlBaseParser#querySpecification.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTrim(ctx: TrimContext): Expression
Create a Trim expression.
Create a Trim expression.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTruncateTable(ctx: TruncateTableContext): LogicalPlan
Create a TruncateTableStatement command.
Create a TruncateTableStatement command.
For example:
TRUNCATE TABLE multi_part_name [PARTITION (partcol1=val1, partcol2=val2 ...)]
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitTypeConstructor(ctx: TypeConstructorContext): Literal
Create a typed Literal expression.
Create a typed Literal expression. A typed literal has the following SQL syntax:
[TYPE] '[VALUE]'Currently Date, Timestamp, Interval and Binary typed literals are supported.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitUncacheTable(ctx: UncacheTableContext): LogicalPlan
Create an UncacheTableStatement logical plan.
Create an UncacheTableStatement logical plan.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitUnitToUnitInterval(ctx: UnitToUnitIntervalContext): CalendarInterval
Creates a CalendarInterval with from-to unit, e.g.
Creates a CalendarInterval with from-to unit, e.g. '2-1' YEAR TO MONTH.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitUnquotedIdentifier(ctx: UnquotedIdentifierContext): AnyRef
Visit a parse tree produced by the
unquotedIdentifierlabeled alternative inSqlBaseParser#strictIdentifier.Visit a parse tree produced by the
unquotedIdentifierlabeled alternative inSqlBaseParser#strictIdentifier.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitUnsetTableProperties(ctx: UnsetTablePropertiesContext): LogicalPlan
Parse AlterViewUnsetPropertiesStatement or AlterTableUnsetPropertiesStatement commands.
Parse AlterViewUnsetPropertiesStatement or AlterTableUnsetPropertiesStatement commands.
For example:
ALTER TABLE table UNSET TBLPROPERTIES [IF EXISTS] ('comment', 'key'); ALTER VIEW view UNSET TBLPROPERTIES [IF EXISTS] ('comment', 'key');- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitUnsupportedHiveNativeCommands(ctx: UnsupportedHiveNativeCommandsContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#unsupportedHiveNativeCommands.Visit a parse tree produced by
SqlBaseParser#unsupportedHiveNativeCommands.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitUpdateTable(ctx: UpdateTableContext): LogicalPlan
Visit a parse tree produced by the
updateTablelabeled alternative inSqlBaseParser#dmlStatementNoWith.Visit a parse tree produced by the
updateTablelabeled alternative inSqlBaseParser#dmlStatementNoWith.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitUse(ctx: UseContext): LogicalPlan
Create a UseStatement logical plan.
Create a UseStatement logical plan.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitValueExpressionDefault(ctx: ValueExpressionDefaultContext): AnyRef
Visit a parse tree produced by the
valueExpressionDefaultlabeled alternative inSqlBaseParser#valueExpression.Visit a parse tree produced by the
valueExpressionDefaultlabeled alternative inSqlBaseParser#valueExpression.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitWhenClause(ctx: WhenClauseContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#whenClause.Visit a parse tree produced by
SqlBaseParser#whenClause.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitWhereClause(ctx: WhereClauseContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#whereClause.Visit a parse tree produced by
SqlBaseParser#whereClause.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitWindowClause(ctx: WindowClauseContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#windowClause.Visit a parse tree produced by
SqlBaseParser#windowClause.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitWindowDef(ctx: WindowDefContext): WindowSpecDefinition
Create a window definition, i.e.
Create a window definition, i.e. WindowSpecDefinition.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitWindowFrame(ctx: WindowFrameContext): AnyRef
Visit a parse tree produced by
SqlBaseParser#windowFrame.Visit a parse tree produced by
SqlBaseParser#windowFrame.The default implementation returns the result of calling
#visitChildrenonctx.- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- SqlBaseBaseVisitor → SqlBaseVisitor
-
def
visitWindowRef(ctx: WindowRefContext): WindowSpecReference
Create a reference to a window frame, i.e.
Create a reference to a window frame, i.e. WindowSpecReference.
- ctx
the parse tree
- returns
the visitor result
- Definition Classes
- AstBuilder → SqlBaseBaseVisitor → SqlBaseVisitor
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
withRepartitionByExpression(ctx: QueryOrganizationContext, expressions: Seq[Expression], query: LogicalPlan): LogicalPlan
Create a clause for DISTRIBUTE BY.
Create a clause for DISTRIBUTE BY.
- Attributes
- protected
-
def
withScriptIOSchema(ctx: ParserRuleContext, inRowFormat: RowFormatContext, recordWriter: Token, outRowFormat: RowFormatContext, recordReader: Token, schemaLess: Boolean): ScriptInputOutputSchema
Create a (Hive based) ScriptInputOutputSchema.
Create a (Hive based) ScriptInputOutputSchema.
- Attributes
- protected