Class

org.apache.spark.sql.execution

SparkSqlAstBuilder

Related Doc: package execution

Permalink

class SparkSqlAstBuilder extends AstBuilder

Builder that converts an ANTLR ParseTree into a LogicalPlan/Expression/TableIdentifier.

Linear Supertypes
AstBuilder, internal.Logging, SqlBaseBaseVisitor[AnyRef], SqlBaseVisitor[AnyRef], AbstractParseTreeVisitor[AnyRef], ParseTreeVisitor[AnyRef], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SparkSqlAstBuilder
  2. AstBuilder
  3. Logging
  4. SqlBaseBaseVisitor
  5. SqlBaseVisitor
  6. AbstractParseTreeVisitor
  7. ParseTreeVisitor
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SparkSqlAstBuilder(conf: SQLConf)

    Permalink

Type Members

  1. type TableHeader = (TableIdentifier, Boolean, Boolean, Boolean)

    Permalink

    Type to keep track of a table header: (identifier, isTemporary, ifNotExists, isExternal).

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def aggregateResult(arg0: AnyRef, arg1: AnyRef): AnyRef

    Permalink
    Attributes
    protected[org.antlr.v4.runtime.tree]
    Definition Classes
    AbstractParseTreeVisitor
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def createSchema(ctx: ColTypeListContext): StructType

    Permalink

    Create top level table schema.

    Create top level table schema.

    Attributes
    protected
    Definition Classes
    AstBuilder
  8. def createStructType(ctx: ComplexColTypeListContext): StructType

    Permalink

    Create a StructType from a sequence of StructFields.

    Create a StructType from a sequence of StructFields.

    Attributes
    protected
    Definition Classes
    AstBuilder
  9. def defaultResult(): AnyRef

    Permalink
    Attributes
    protected[org.antlr.v4.runtime.tree]
    Definition Classes
    AbstractParseTreeVisitor
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def expression(ctx: ParserRuleContext): Expression

    Permalink

    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
    Definition Classes
    AstBuilder
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def initializeLogIfNecessary(isInterpreter: Boolean): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  17. def isExplainableStatement(plan: LogicalPlan): Boolean

    Permalink

    Determine if a plan should be explained at all.

    Determine if a plan should be explained at all.

    Attributes
    protected
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def isTraceEnabled(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  20. def log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  21. def logDebug(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  22. def logDebug(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  23. def logError(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  24. def logError(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  25. def logInfo(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  26. def logInfo(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  27. def logName: String

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  28. def logTrace(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  29. def logTrace(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  30. def logWarning(msg: ⇒ String, throwable: Throwable): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  31. def logWarning(msg: ⇒ String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  32. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  33. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. def plan(tree: ParserRuleContext): LogicalPlan

    Permalink
    Attributes
    protected
    Definition Classes
    AstBuilder
  36. def shouldVisitNextChild(arg0: RuleNode, arg1: AnyRef): Boolean

    Permalink
    Attributes
    protected[org.antlr.v4.runtime.tree]
    Definition Classes
    AbstractParseTreeVisitor
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  39. def typedVisit[T](ctx: ParseTree): T

    Permalink
    Attributes
    protected
    Definition Classes
    AstBuilder
  40. def visit(arg0: ParseTree): AnyRef

    Permalink
    Definition Classes
    AbstractParseTreeVisitor → ParseTreeVisitor
  41. def visitAddTablePartition(ctx: AddTablePartitionContext): LogicalPlan

    Permalink

    Create an AlterTableAddPartitionCommand command.

    Create an AlterTableAddPartitionCommand command.

    For example:

    ALTER TABLE table ADD [IF NOT EXISTS] PARTITION spec [LOCATION 'loc1']
    ALTER VIEW view ADD [IF NOT EXISTS] PARTITION spec

    ALTER VIEW ... ADD PARTITION ... is not supported because the concept of partitioning is associated with physical tables

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  42. def visitAggregation(ctx: AggregationContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  43. def visitAliasedQuery(ctx: AliasedQueryContext): LogicalPlan

    Permalink

    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.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  44. def visitAliasedRelation(ctx: AliasedRelationContext): LogicalPlan

    Permalink

    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.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  45. def visitAlterViewQuery(ctx: AlterViewQueryContext): LogicalPlan

    Permalink

    Alter the query of a view.

    Alter the query of a view. This creates a AlterViewAsCommand command.

    For example:

    ALTER VIEW [db_name.]view_name AS SELECT ...;
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  46. def visitAnalyze(ctx: AnalyzeContext): LogicalPlan

    Permalink

    Create an AnalyzeTableCommand command or an AnalyzeColumnCommand command.

    Create an AnalyzeTableCommand command or an AnalyzeColumnCommand command. Example SQL for analyzing table :

    ANALYZE TABLE table COMPUTE STATISTICS [NOSCAN];

    Example SQL for analyzing columns :

    ANALYZE TABLE table COMPUTE STATISTICS FOR COLUMNS column1, column2;
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  47. def visitArithmeticBinary(ctx: ArithmeticBinaryContext): Expression

    Permalink

    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: '|'

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  48. def visitArithmeticOperator(ctx: ArithmeticOperatorContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  49. def visitArithmeticUnary(ctx: ArithmeticUnaryContext): Expression

    Permalink

    Create a unary arithmetic expression.

    Create a unary arithmetic expression. The following arithmetic operators are supported: - Plus: '+' - Minus: '-' - Bitwise Not: '~'

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  50. def visitBigDecimalLiteral(ctx: BigDecimalLiteralContext): Literal

    Permalink

    Create a BigDecimal Literal expression.

    Create a BigDecimal Literal expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  51. def visitBigIntLiteral(ctx: BigIntLiteralContext): Literal

    Permalink

    Create a Long Literal expression.

    Create a Long Literal expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  52. def visitBooleanDefault(ctx: BooleanDefaultContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  53. def visitBooleanLiteral(ctx: BooleanLiteralContext): Literal

    Permalink

    Create a Boolean literal expression.

    Create a Boolean literal expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  54. def visitBooleanValue(ctx: BooleanValueContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  55. def visitBucketSpec(ctx: BucketSpecContext): BucketSpec

    Permalink

    Create a BucketSpec.

    Create a BucketSpec.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  56. def visitCacheTable(ctx: CacheTableContext): LogicalPlan

    Permalink

    Create a CacheTableCommand logical plan.

    Create a CacheTableCommand logical plan.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  57. def visitCast(ctx: CastContext): Expression

    Permalink

    Create a Cast expression.

    Create a Cast expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  58. def visitChildren(node: RuleNode): AnyRef

    Permalink

    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
  59. def visitClearCache(ctx: ClearCacheContext): LogicalPlan

    Permalink

    Create a ClearCacheCommand logical plan.

    Create a ClearCacheCommand logical plan.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  60. def visitColType(ctx: ColTypeContext): StructField

    Permalink

    Create a top level StructField from a column definition.

    Create a top level StructField from a column definition.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  61. def visitColTypeList(ctx: ColTypeListContext): Seq[StructField]

    Permalink

    Create a StructType from a number of column definitions.

    Create a StructType from a number of column definitions.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  62. def visitColumnReference(ctx: ColumnReferenceContext): Expression

    Permalink

    Create an UnresolvedAttribute expression.

    Create an UnresolvedAttribute expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  63. def visitComparison(ctx: ComparisonContext): Expression

    Permalink

    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: '>='

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  64. def visitComparisonOperator(ctx: ComparisonOperatorContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  65. def visitComplexColType(ctx: ComplexColTypeContext): StructField

    Permalink

    Create a StructField from a column definition.

    Create a StructField from a column definition.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  66. def visitComplexColTypeList(ctx: ComplexColTypeListContext): Seq[StructField]

    Permalink

    Create a StructType from a number of column definitions.

    Create a StructType from a number of column definitions.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  67. def visitComplexDataType(ctx: ComplexDataTypeContext): DataType

    Permalink

    Create a complex DataType.

    Create a complex DataType. Arrays, Maps and Structures are supported.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  68. def visitConstantDefault(ctx: ConstantDefaultContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  69. def visitConstantList(ctx: ConstantListContext): Seq[String]

    Permalink

    Convert a constants list into a String sequence.

    Convert a constants list into a String sequence.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  70. def visitCreateDatabase(ctx: CreateDatabaseContext): LogicalPlan

    Permalink

    Create a CreateDatabaseCommand command.

    Create a CreateDatabaseCommand command.

    For example:

    CREATE DATABASE [IF NOT EXISTS] database_name [COMMENT database_comment]
     [LOCATION path] [WITH DBPROPERTIES (key1=val1, key2=val2, ...)]
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  71. def visitCreateFileFormat(ctx: CreateFileFormatContext): CatalogStorageFormat

    Permalink

    Create a CatalogStorageFormat for creating tables.

    Create a CatalogStorageFormat for creating tables.

    Format: STORED AS ...

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  72. def visitCreateFunction(ctx: CreateFunctionContext): LogicalPlan

    Permalink

    Create a CreateFunctionCommand command.

    Create a CreateFunctionCommand command.

    For example:

    CREATE [TEMPORARY] FUNCTION [db_name.]function_name AS class_name
     [USING JAR|FILE|ARCHIVE 'file_uri' [, JAR|FILE|ARCHIVE 'file_uri']];
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  73. def visitCreateTable(ctx: CreateTableContext): LogicalPlan

    Permalink

    Create a table, returning a CreateTable logical plan.

    Create a table, returning a CreateTable logical plan.

    This is not used to create datasource tables, which is handled through "CREATE TABLE ... USING ...".

    Note: several features are currently not supported - temporary tables, bucketing, skewed columns and storage handlers (STORED BY).

    Expected format:

    CREATE [EXTERNAL] TABLE [IF NOT EXISTS] [db_name.]table_name
    [(col1[:] data_type [COMMENT col_comment], ...)]
    [COMMENT table_comment]
    [PARTITIONED BY (col2[:] data_type [COMMENT col_comment], ...)]
    [ROW FORMAT row_format]
    [STORED AS file_format]
    [LOCATION path]
    [TBLPROPERTIES (property_name=property_value, ...)]
    [AS select_statement];
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  74. def visitCreateTableHeader(ctx: CreateTableHeaderContext): TableHeader

    Permalink

    Validate a create table statement and return the TableIdentifier.

    Validate a create table statement and return the TableIdentifier.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  75. def visitCreateTableLike(ctx: CreateTableLikeContext): LogicalPlan

    Permalink

    Create a CreateTableLikeCommand command.

    Create a CreateTableLikeCommand command.

    For example:

    CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
    LIKE [other_db_name.]existing_table_name
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  76. def visitCreateTableUsing(ctx: CreateTableUsingContext): LogicalPlan

    Permalink

    Create a data source table, returning a CreateTable logical plan.

    Create a data source table, returning a CreateTable logical plan.

    Expected format:

    CREATE [EXTERNAL] TABLE [IF NOT EXISTS] [db_name.]table_name
    USING table_provider
    [OPTIONS table_property_list]
    [PARTITIONED BY (col_name, col_name, ...)]
    [CLUSTERED BY (col_name, col_name, ...)
     [SORTED BY (col_name [ASC|DESC], ...)]
     INTO num_buckets BUCKETS
    ]
    [AS select_statement];
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  77. def visitCreateTempViewUsing(ctx: CreateTempViewUsingContext): LogicalPlan

    Permalink

    Creates a CreateTempViewUsing logical plan.

    Creates a CreateTempViewUsing logical plan.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  78. def visitCreateView(ctx: CreateViewContext): LogicalPlan

    Permalink

    Create or replace a view.

    Create or replace a view. This creates a CreateViewCommand command.

    For example:

    CREATE [OR REPLACE] [[GLOBAL] TEMPORARY] VIEW [IF NOT EXISTS] [db_name.]view_name
    [(column_name [COMMENT column_comment], ...) ]
    [COMMENT view_comment]
    [TBLPROPERTIES (property_name = property_value, ...)]
    AS SELECT ...;
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  79. def visitCtes(ctx: CtesContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  80. def visitDecimalLiteral(ctx: DecimalLiteralContext): Literal

    Permalink

    Create a decimal literal for a regular decimal number.

    Create a decimal literal for a regular decimal number.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  81. def visitDereference(ctx: DereferenceContext): Expression

    Permalink

    Create a dereference expression.

    Create a dereference expression. The return type depends on the type of the parent, this can either be a UnresolvedAttribute (if the parent is an UnresolvedAttribute), or an UnresolvedExtractValue if the parent is some expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  82. def visitDescribeColName(ctx: DescribeColNameContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  83. def visitDescribeDatabase(ctx: DescribeDatabaseContext): LogicalPlan

    Permalink

    Create a DescribeDatabaseCommand command.

    Create a DescribeDatabaseCommand command.

    For example:

    DESCRIBE DATABASE [EXTENDED] database;
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  84. def visitDescribeFuncName(ctx: DescribeFuncNameContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  85. def visitDescribeFunction(ctx: DescribeFunctionContext): LogicalPlan

    Permalink

    Create a plan for a DESCRIBE FUNCTION command.

    Create a plan for a DESCRIBE FUNCTION command.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  86. def visitDescribeTable(ctx: DescribeTableContext): LogicalPlan

    Permalink

    Create a DescribeTableCommand logical plan.

    Create a DescribeTableCommand logical plan.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  87. def visitDoubleLiteral(ctx: DoubleLiteralContext): Literal

    Permalink

    Create a Double Literal expression.

    Create a Double Literal expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  88. def visitDropDatabase(ctx: DropDatabaseContext): LogicalPlan

    Permalink

    Create a DropDatabaseCommand command.

    Create a DropDatabaseCommand command.

    For example:

    DROP (DATABASE|SCHEMA) [IF EXISTS] database [RESTRICT|CASCADE];
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  89. def visitDropFunction(ctx: DropFunctionContext): LogicalPlan

    Permalink

    Create a DropFunctionCommand command.

    Create a DropFunctionCommand command.

    For example:

    DROP [TEMPORARY] FUNCTION [IF EXISTS] function;
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  90. def visitDropTable(ctx: DropTableContext): LogicalPlan

    Permalink

    Create a DropTableCommand command.

    Create a DropTableCommand command.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  91. def visitDropTablePartitions(ctx: DropTablePartitionsContext): LogicalPlan

    Permalink

    Create an AlterTableDropPartitionCommand command

    Create an AlterTableDropPartitionCommand command

    For example:

    ALTER TABLE table 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

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  92. def visitErrorNode(arg0: ErrorNode): AnyRef

    Permalink
    Definition Classes
    AbstractParseTreeVisitor → ParseTreeVisitor
  93. def visitExists(ctx: ExistsContext): Expression

    Permalink

    Create a filtering correlated sub-query (EXISTS).

    Create a filtering correlated sub-query (EXISTS).

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  94. def visitExplain(ctx: ExplainContext): LogicalPlan

    Permalink

    Create an ExplainCommand logical plan.

    Create an ExplainCommand logical plan. The syntax of using this command in SQL is:

    EXPLAIN (EXTENDED | CODEGEN) SELECT * FROM ...
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  95. def visitExpression(ctx: ExpressionContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  96. def visitFailNativeCommand(ctx: FailNativeCommandContext): LogicalPlan

    Permalink

    Fail an unsupported Hive native command.

    Fail an unsupported Hive native command.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  97. def visitFrameBound(ctx: FrameBoundContext): FrameBoundary

    Permalink

    Create or resolve a FrameBoundary.

    Create or resolve a FrameBoundary. Simple math expressions are allowed for Value Preceding/Following boundaries. These expressions must be constant (foldable) and return an integer value.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  98. def visitFromClause(ctx: FromClauseContext): LogicalPlan

    Permalink

    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.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  99. def visitFunctionCall(ctx: FunctionCallContext): Expression

    Permalink

    Create a (windowed) Function expression.

    Create a (windowed) Function expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  100. def visitFunctionName(ctx: QualifiedNameContext): FunctionIdentifier

    Permalink

    Create a function database (optional) and name pair.

    Create a function database (optional) and name pair.

    Attributes
    protected
    Definition Classes
    AstBuilder
  101. def visitGenericFileFormat(ctx: GenericFileFormatContext): CatalogStorageFormat

    Permalink

    Resolve a HiveSerDe based on the name given and return it as a CatalogStorageFormat.

    Resolve a HiveSerDe based on the name given and return it as a CatalogStorageFormat.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  102. def visitGroupingSet(ctx: GroupingSetContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  103. def visitIdentifier(ctx: IdentifierContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  104. def visitIdentifierComment(ctx: IdentifierCommentContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  105. def visitIdentifierCommentList(ctx: IdentifierCommentListContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  106. def visitIdentifierList(ctx: IdentifierListContext): Seq[String]

    Permalink

    Create a Sequence of Strings for a parenthesis enclosed alias list.

    Create a Sequence of Strings for a parenthesis enclosed alias list.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  107. def visitIdentifierSeq(ctx: IdentifierSeqContext): Seq[String]

    Permalink

    Create a Sequence of Strings for an identifier list.

    Create a Sequence of Strings for an identifier list.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  108. def visitInlineTable(ctx: InlineTableContext): LogicalPlan

    Permalink

    Create an inline table (a virtual table in Hive parlance).

    Create an inline table (a virtual table in Hive parlance).

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  109. def visitInlineTableDefault1(ctx: InlineTableDefault1Context): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  110. def visitInlineTableDefault2(ctx: InlineTableDefault2Context): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  111. def visitInsertInto(ctx: InsertIntoContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  112. def visitIntegerLiteral(ctx: IntegerLiteralContext): Literal

    Permalink

    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.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  113. def visitInterval(ctx: IntervalContext): Literal

    Permalink

    Create a CalendarInterval literal expression.

    Create a CalendarInterval literal expression. An interval expression can contain multiple unit value pairs, for instance: interval 2 months 2 days.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  114. def visitIntervalField(ctx: IntervalFieldContext): CalendarInterval

    Permalink

    Create a CalendarInterval for a unit value pair.

    Create a CalendarInterval for a unit value pair. Two unit configuration types are supported: - Single unit. - From-To unit (only 'YEAR TO MONTH' and 'DAY TO SECOND' are supported).

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  115. def visitIntervalLiteral(ctx: IntervalLiteralContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  116. def visitIntervalValue(ctx: IntervalValueContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  117. def visitJoinCriteria(ctx: JoinCriteriaContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  118. def visitJoinRelation(ctx: JoinRelationContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  119. def visitJoinType(ctx: JoinTypeContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  120. def visitLateralView(ctx: LateralViewContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  121. def visitLoadData(ctx: LoadDataContext): LogicalPlan

    Permalink

    Create a LoadDataCommand command.

    Create a LoadDataCommand command.

    For example:

    LOAD DATA [LOCAL] INPATH 'filepath' [OVERWRITE] INTO TABLE tablename
    [PARTITION (partcol1=val1, partcol2=val2 ...)]
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  122. def visitLocationSpec(ctx: LocationSpecContext): String

    Permalink

    Create location string.

    Create location string.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  123. def visitLogicalBinary(ctx: LogicalBinaryContext): Expression

    Permalink

    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.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  124. def visitLogicalNot(ctx: LogicalNotContext): Expression

    Permalink

    Invert a boolean expression.

    Invert a boolean expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  125. def visitManageResource(ctx: ManageResourceContext): LogicalPlan

    Permalink

    Create a AddFileCommand, AddJarCommand, ListFilesCommand or ListJarsCommand command depending on the requested operation on resources.

    Create a AddFileCommand, AddJarCommand, ListFilesCommand or ListJarsCommand command depending on the requested operation on resources. Expected format:

    ADD (FILE[S] <filepath ...> | JAR[S] <jarpath ...>)
    LIST (FILE[S] [filepath ...] | JAR[S] [jarpath ...])
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  126. def visitMultiInsertQuery(ctx: MultiInsertQueryContext): LogicalPlan

    Permalink

    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.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  127. def visitMultiInsertQueryBody(ctx: MultiInsertQueryBodyContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  128. def visitNamedExpression(ctx: NamedExpressionContext): Expression

    Permalink

    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.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  129. def visitNamedExpressionSeq(ctx: NamedExpressionSeqContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  130. def visitNamedQuery(ctx: NamedQueryContext): SubqueryAlias

    Permalink

    Create a named logical plan.

    Create a named logical plan.

    This is only used for Common Table Expressions.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  131. def visitNamedWindow(ctx: NamedWindowContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  132. def visitNestedConstantList(ctx: NestedConstantListContext): Seq[Seq[String]]

    Permalink

    Convert a nested constants list into a sequence of string sequences.

    Convert a nested constants list into a sequence of string sequences.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  133. def visitNonOptionalPartitionSpec(ctx: PartitionSpecContext): Map[String, String]

    Permalink

    Create a partition specification map without optional values.

    Create a partition specification map without optional values.

    Attributes
    protected
    Definition Classes
    AstBuilder
  134. def visitNonReserved(ctx: NonReservedContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  135. def visitNullLiteral(ctx: NullLiteralContext): Literal

    Permalink

    Create a NULL literal expression.

    Create a NULL literal expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  136. def visitNumericLiteral(ctx: NumericLiteralContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  137. def visitOrderedIdentifier(ctx: OrderedIdentifierContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  138. def visitOrderedIdentifierList(ctx: OrderedIdentifierListContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  139. def visitParenthesizedExpression(ctx: ParenthesizedExpressionContext): Expression

    Permalink

    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.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  140. def visitPartitionSpec(ctx: PartitionSpecContext): Map[String, Option[String]]

    Permalink

    Create a partition specification map.

    Create a partition specification map.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  141. def visitPartitionSpecLocation(ctx: PartitionSpecLocationContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  142. def visitPartitionVal(ctx: PartitionValContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  143. def visitPredicate(ctx: PredicateContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  144. def visitPredicateOperator(ctx: PredicateOperatorContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  145. def visitPredicated(ctx: PredicatedContext): Expression

    Permalink

    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
    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  146. def visitPrimitiveDataType(ctx: PrimitiveDataTypeContext): DataType

    Permalink

    Resolve/create a primitive type.

    Resolve/create a primitive type.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  147. def visitQualifiedName(ctx: QualifiedNameContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  148. def visitQuery(ctx: QueryContext): LogicalPlan

    Permalink

    Create a top-level plan with Common Table Expressions.

    Create a top-level plan with Common Table Expressions.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  149. def visitQueryOrganization(ctx: QueryOrganizationContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  150. def visitQueryPrimaryDefault(ctx: QueryPrimaryDefaultContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  151. def visitQuerySpecification(ctx: QuerySpecificationContext): LogicalPlan

    Permalink

    Create a logical plan using a query specification.

    Create a logical plan using a query specification.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  152. def visitQueryTermDefault(ctx: QueryTermDefaultContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  153. def visitQuotedIdentifier(ctx: QuotedIdentifierContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  154. def visitQuotedIdentifierAlternative(ctx: QuotedIdentifierAlternativeContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  155. def visitRecoverPartitions(ctx: RecoverPartitionsContext): LogicalPlan

    Permalink

    Create an AlterTableRecoverPartitionsCommand command

    Create an AlterTableRecoverPartitionsCommand command

    For example:

    ALTER TABLE table RECOVER PARTITIONS;
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  156. def visitRefreshResource(ctx: RefreshResourceContext): LogicalPlan

    Permalink

    Create a RefreshTable logical plan.

    Create a RefreshTable logical plan.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  157. def visitRefreshTable(ctx: RefreshTableContext): LogicalPlan

    Permalink

    Create a RefreshTable logical plan.

    Create a RefreshTable logical plan.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  158. def visitRelation(ctx: RelationContext): LogicalPlan

    Permalink

    Create a single relation referenced in a FROM claused.

    Create a single relation referenced in a FROM claused. This method is used when a part of the join condition is nested, for example:

    select * from t1 join (t2 cross join t3) on col1 = col2
    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  159. def visitRenameTable(ctx: RenameTableContext): LogicalPlan

    Permalink

    Create a AlterTableRenameCommand command.

    Create a AlterTableRenameCommand command.

    For example:

    ALTER TABLE table1 RENAME TO table2;
    ALTER VIEW view1 RENAME TO view2;
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  160. def visitRenameTablePartition(ctx: RenameTablePartitionContext): LogicalPlan

    Permalink

    Create an AlterTableRenamePartitionCommand command

    Create an AlterTableRenamePartitionCommand command

    For example:

    ALTER TABLE table PARTITION spec1 RENAME TO PARTITION spec2;
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  161. def visitRepairTable(ctx: RepairTableContext): LogicalPlan

    Permalink

    Create a AlterTableRecoverPartitionsCommand command.

    Create a AlterTableRecoverPartitionsCommand command.

    For example:

    MSCK REPAIR TABLE tablename
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  162. def visitResetConfiguration(ctx: ResetConfigurationContext): LogicalPlan

    Permalink

    Create a ResetCommand logical plan.

    Create a ResetCommand logical plan. Example SQL :

    RESET;
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  163. def visitResource(ctx: ResourceContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  164. def visitRowConstructor(ctx: RowConstructorContext): Expression

    Permalink

    Create a CreateStruct expression.

    Create a CreateStruct expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  165. def visitRowFormatDelimited(ctx: RowFormatDelimitedContext): CatalogStorageFormat

    Permalink

    Create a delimited row format properties object.

    Create a delimited row format properties object.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  166. def visitRowFormatSerde(ctx: RowFormatSerdeContext): CatalogStorageFormat

    Permalink

    Create SERDE row format name and properties pair.

    Create SERDE row format name and properties pair.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  167. def visitSample(ctx: SampleContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  168. def visitSearchedCase(ctx: SearchedCaseContext): Expression

    Permalink

    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

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  169. def visitSetConfiguration(ctx: SetConfigurationContext): LogicalPlan

    Permalink

    Create a SetCommand logical plan.

    Create a SetCommand logical plan.

    Note that we assume that everything after the SET keyword is assumed to be a part of the key-value pair. The split between key and value is made by searching for the first = character in the raw string.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  170. def visitSetDatabaseProperties(ctx: SetDatabasePropertiesContext): LogicalPlan

    Permalink

    Create an AlterDatabasePropertiesCommand command.

    Create an AlterDatabasePropertiesCommand command.

    For example:

    ALTER (DATABASE|SCHEMA) database SET DBPROPERTIES (property_name=property_value, ...);
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  171. def visitSetOperation(ctx: SetOperationContext): LogicalPlan

    Permalink

    Connect two queries by a Set operator.

    Connect two queries by a Set operator.

    Supported Set operators are: - UNION [DISTINCT] - UNION ALL - EXCEPT [DISTINCT] - MINUS [DISTINCT] - INTERSECT [DISTINCT]

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  172. def visitSetQuantifier(ctx: SetQuantifierContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  173. def visitSetTableLocation(ctx: SetTableLocationContext): LogicalPlan

    Permalink

    Create an AlterTableSetLocationCommand command

    Create an AlterTableSetLocationCommand command

    For example:

    ALTER TABLE table [PARTITION spec] SET LOCATION "loc";
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  174. def visitSetTableProperties(ctx: SetTablePropertiesContext): LogicalPlan

    Permalink

    Create an AlterTableSetPropertiesCommand command.

    Create an AlterTableSetPropertiesCommand command.

    For example:

    ALTER TABLE table SET TBLPROPERTIES ('comment' = new_comment);
    ALTER VIEW view SET TBLPROPERTIES ('comment' = new_comment);
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  175. def visitSetTableSerDe(ctx: SetTableSerDeContext): LogicalPlan

    Permalink

    Create an AlterTableSerDePropertiesCommand command.

    Create an AlterTableSerDePropertiesCommand command.

    For example:

    ALTER TABLE table [PARTITION spec] SET SERDE serde_name [WITH SERDEPROPERTIES props];
    ALTER TABLE table [PARTITION spec] SET SERDEPROPERTIES serde_properties;
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  176. def visitShowColumns(ctx: ShowColumnsContext): LogicalPlan

    Permalink

    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 ShowColumnsCommand logical plan.

    The syntax of using this command in SQL is:

    SHOW COLUMNS (FROM | IN) table_identifier [(FROM | IN) database];
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  177. def visitShowCreateTable(ctx: ShowCreateTableContext): LogicalPlan

    Permalink

    Creates a ShowCreateTableCommand

    Creates a ShowCreateTableCommand

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  178. def visitShowDatabases(ctx: ShowDatabasesContext): LogicalPlan

    Permalink

    Create a ShowDatabasesCommand logical plan.

    Create a ShowDatabasesCommand logical plan. Example SQL:

    SHOW (DATABASES|SCHEMAS) [LIKE 'identifier_with_wildcards'];
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  179. def visitShowFunctions(ctx: ShowFunctionsContext): LogicalPlan

    Permalink

    Create a plan for a SHOW FUNCTIONS command.

    Create a plan for a SHOW FUNCTIONS command.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  180. def visitShowPartitions(ctx: ShowPartitionsContext): LogicalPlan

    Permalink

    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 ShowPartitionsCommand logical plan

    The syntax of using this command in SQL is:

    SHOW PARTITIONS table_identifier [partition_spec];
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  181. def visitShowTables(ctx: ShowTablesContext): LogicalPlan

    Permalink

    Create a ShowTablesCommand logical plan.

    Create a ShowTablesCommand logical plan. Example SQL :

    SHOW TABLES [(IN|FROM) database_name] [[LIKE] 'identifier_with_wildcards'];
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  182. def visitShowTblProperties(ctx: ShowTblPropertiesContext): LogicalPlan

    Permalink

    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 table_name[('propertyKey')];
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  183. def visitSimpleCase(ctx: SimpleCaseContext): Expression

    Permalink

    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
    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  184. def visitSingleDataType(ctx: SingleDataTypeContext): DataType

    Permalink
    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  185. def visitSingleExpression(ctx: SingleExpressionContext): Expression

    Permalink
    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  186. def visitSingleInsertQuery(ctx: SingleInsertQueryContext): LogicalPlan

    Permalink

    Create a logical plan for a regular (single-insert) query.

    Create a logical plan for a regular (single-insert) query.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  187. def visitSingleStatement(ctx: SingleStatementContext): LogicalPlan

    Permalink
    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  188. def visitSingleTableIdentifier(ctx: SingleTableIdentifierContext): TableIdentifier

    Permalink
    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  189. def visitSkewSpec(ctx: SkewSpecContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  190. def visitSmallIntLiteral(ctx: SmallIntLiteralContext): Literal

    Permalink

    Create a Short Literal expression.

    Create a Short Literal expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  191. def visitSortItem(ctx: SortItemContext): SortOrder

    Permalink

    Create a SortOrder expression.

    Create a SortOrder expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  192. def visitStar(ctx: StarContext): Expression

    Permalink

    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.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  193. def visitStatementDefault(ctx: StatementDefaultContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  194. def visitStorageHandler(ctx: StorageHandlerContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  195. def visitStringConstant(ctx: ConstantContext): String

    Permalink

    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
    Definition Classes
    AstBuilder
  196. def visitStringLiteral(ctx: StringLiteralContext): Literal

    Permalink

    Create a String literal expression.

    Create a String literal expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  197. def visitSubquery(ctx: SubqueryContext): LogicalPlan

    Permalink

    Create a logical plan for a sub-query.

    Create a logical plan for a sub-query.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  198. def visitSubqueryExpression(ctx: SubqueryExpressionContext): Expression

    Permalink

    Create a ScalarSubquery expression.

    Create a ScalarSubquery expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  199. def visitSubscript(ctx: SubscriptContext): Expression

    Permalink

    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.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  200. def visitTable(ctx: TableContext): LogicalPlan

    Permalink

    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
    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  201. def visitTableFileFormat(ctx: TableFileFormatContext): CatalogStorageFormat

    Permalink

    Create a CatalogStorageFormat.

    Create a CatalogStorageFormat.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  202. def visitTableIdentifier(ctx: TableIdentifierContext): TableIdentifier

    Permalink

    Create a TableIdentifier from a 'tableName' or 'databaseName'.'tableName' pattern.

    Create a TableIdentifier from a 'tableName' or 'databaseName'.'tableName' pattern.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  203. def visitTableName(ctx: TableNameContext): LogicalPlan

    Permalink

    Create an aliased table reference.

    Create an aliased table reference. This is typically used in FROM clauses.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  204. def visitTableProperty(ctx: TablePropertyContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  205. def visitTablePropertyKey(key: TablePropertyKeyContext): String

    Permalink

    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.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  206. def visitTablePropertyList(ctx: TablePropertyListContext): Map[String, String]

    Permalink

    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.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  207. def visitTablePropertyValue(value: TablePropertyValueContext): String

    Permalink

    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.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  208. def visitTableProvider(ctx: TableProviderContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  209. def visitTableValuedFunction(ctx: TableValuedFunctionContext): LogicalPlan

    Permalink

    Create a table-valued function call with arguments, e.g.

    Create a table-valued function call with arguments, e.g. range(1000)

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  210. def visitTerminal(arg0: TerminalNode): AnyRef

    Permalink
    Definition Classes
    AbstractParseTreeVisitor → ParseTreeVisitor
  211. def visitTimeFunctionCall(ctx: TimeFunctionCallContext): Expression

    Permalink

    Create a current timestamp/date expression.

    Create a current timestamp/date expression. These are different from regular function because they do not require the user to specify braces when calling them.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  212. def visitTinyIntLiteral(ctx: TinyIntLiteralContext): Literal

    Permalink

    Create a Byte Literal expression.

    Create a Byte Literal expression.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  213. def visitTruncateTable(ctx: TruncateTableContext): LogicalPlan

    Permalink

    Create a TruncateTableCommand command.

    Create a TruncateTableCommand command.

    For example:

    TRUNCATE TABLE tablename [PARTITION (partcol1=val1, partcol2=val2 ...)]
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  214. def visitTypeConstructor(ctx: TypeConstructorContext): Literal

    Permalink

    Create a typed Literal expression.

    Create a typed Literal expression. A typed literal has the following SQL syntax:

    [TYPE] '[VALUE]'

    Currently Date, Timestamp and Binary typed literals are supported.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  215. def visitUncacheTable(ctx: UncacheTableContext): LogicalPlan

    Permalink

    Create an UncacheTableCommand logical plan.

    Create an UncacheTableCommand logical plan.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  216. def visitUnquotedIdentifier(ctx: UnquotedIdentifierContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  217. def visitUnsetTableProperties(ctx: UnsetTablePropertiesContext): LogicalPlan

    Permalink

    Create an AlterTableUnsetPropertiesCommand command.

    Create an AlterTableUnsetPropertiesCommand command.

    For example:

    ALTER TABLE table UNSET TBLPROPERTIES [IF EXISTS] ('comment', 'key');
    ALTER VIEW view UNSET TBLPROPERTIES [IF EXISTS] ('comment', 'key');
    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  218. def visitUnsupportedHiveNativeCommands(ctx: UnsupportedHiveNativeCommandsContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  219. def visitUse(ctx: UseContext): LogicalPlan

    Permalink

    Create a SetDatabaseCommand logical plan.

    Create a SetDatabaseCommand logical plan.

    Definition Classes
    SparkSqlAstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  220. def visitValueExpressionDefault(ctx: ValueExpressionDefaultContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  221. def visitWhenClause(ctx: WhenClauseContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  222. def visitWindowDef(ctx: WindowDefContext): WindowSpecDefinition

    Permalink

    Create a window definition, i.e.

    Create a window definition, i.e. WindowSpecDefinition.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  223. def visitWindowFrame(ctx: WindowFrameContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  224. def visitWindowRef(ctx: WindowRefContext): WindowSpecReference

    Permalink

    Create a reference to a window frame, i.e.

    Create a reference to a window frame, i.e. WindowSpecReference.

    Definition Classes
    AstBuilderSqlBaseBaseVisitorSqlBaseVisitor
  225. def visitWindows(ctx: WindowsContext): AnyRef

    Permalink
    Definition Classes
    SqlBaseBaseVisitorSqlBaseVisitor
  226. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  227. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  228. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  229. def withScriptIOSchema(ctx: QuerySpecificationContext, inRowFormat: RowFormatContext, recordWriter: Token, outRowFormat: RowFormatContext, recordReader: Token, schemaLess: Boolean): ScriptInputOutputSchema

    Permalink

    Create a ScriptInputOutputSchema.

    Create a ScriptInputOutputSchema.

    Attributes
    protected
    Definition Classes
    SparkSqlAstBuilderAstBuilder

Inherited from AstBuilder

Inherited from internal.Logging

Inherited from SqlBaseBaseVisitor[AnyRef]

Inherited from SqlBaseVisitor[AnyRef]

Inherited from AbstractParseTreeVisitor[AnyRef]

Inherited from ParseTreeVisitor[AnyRef]

Inherited from AnyRef

Inherited from Any

Ungrouped