Determine if a plan should be explained at all.
Determine if a plan should be explained at all.
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
Alter the query of a view.
Alter the query of a view. This creates a CreateViewCommand command.
Create an AnalyzeTableCommand command.
Create an AnalyzeTableCommand command. This currently only implements the NOSCAN option (other options are passed on to Hive) e.g.:
ANALYZE TABLE table COMPUTE STATISTICS NOSCAN;
Create a BucketSpec.
Create a BucketSpec.
Create a CacheTableCommand logical plan.
Create a CacheTableCommand logical plan.
Create a ClearCacheCommand logical plan.
Create a ClearCacheCommand logical plan.
Convert a constants list into a String sequence.
Convert a constants list into a String sequence.
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, ...)]
Create a CatalogStorageFormat for creating tables.
Create a CatalogStorageFormat for creating tables.
Format: STORED AS ...
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']];
Create a table, returning either a CreateTableCommand or a CreateHiveTableAsSelectLogicalPlan.
Create a table, returning either a CreateTableCommand or a CreateHiveTableAsSelectLogicalPlan.
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];
Validate a create table statement and return the TableIdentifier.
Validate a create table statement and return the TableIdentifier.
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
Create a CreateTableUsing or a CreateTableUsingAsSelect logical plan.
Create a CreateTableUsing or a CreateTableUsingAsSelect logical plan.
TODO add bucketing and partitioning.
Creates a CreateTempViewUsing logical plan.
Creates a CreateTempViewUsing logical plan.
Create or replace a view.
Create or replace a view. This creates a CreateViewCommand command.
For example:
CREATE [TEMPORARY] VIEW [IF NOT EXISTS] [db_name.]view_name [(column_name [COMMENT column_comment], ...) ] [COMMENT view_comment] [TBLPROPERTIES (property_name = property_value, ...)] AS SELECT ...;
Create a DescribeDatabaseCommand command.
Create a DescribeDatabaseCommand command.
For example:
DESCRIBE DATABASE [EXTENDED] database;
Create a plan for a DESCRIBE FUNCTION command.
Create a plan for a DESCRIBE FUNCTION command.
Create a DescribeTableCommand logical plan.
Create a DescribeTableCommand logical plan.
Create a DropDatabaseCommand command.
Create a DropDatabaseCommand command.
For example:
DROP (DATABASE|SCHEMA) [IF EXISTS] database [RESTRICT|CASCADE];
Create a DropFunctionCommand command.
Create a DropFunctionCommand command.
For example:
DROP [TEMPORARY] FUNCTION [IF EXISTS] function;
Create a DropTableCommand command.
Create a DropTableCommand command.
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
Create an ExplainCommand logical plan.
Create an ExplainCommand logical plan. The syntax of using this command in SQL is:
EXPLAIN (EXTENDED | CODEGEN) SELECT * FROM ...
Fail an unsupported Hive native command.
Fail an unsupported Hive native command.
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.
Create a LoadDataCommand command.
Create a LoadDataCommand command.
For example:
LOAD DATA [LOCAL] INPATH 'filepath' [OVERWRITE] INTO TABLE tablename [PARTITION (partcol1=val1, partcol2=val2 ...)]
Create location string.
Create location string.
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 ...])
Convert a nested constants list into a sequence of string sequences.
Convert a nested constants list into a sequence of string sequences.
Create a RefreshTable logical plan.
Create a RefreshTable logical plan.
Create a RefreshTable logical plan.
Create a RefreshTable logical plan.
Create a AlterTableRenameCommand command.
Create a AlterTableRenameCommand command.
For example:
ALTER TABLE table1 RENAME TO table2; ALTER VIEW view1 RENAME TO view2;
Create an AlterTableRenamePartitionCommand command
Create an AlterTableRenamePartitionCommand command
For example:
ALTER TABLE table PARTITION spec1 RENAME TO PARTITION spec2;
Create a ResetCommand logical plan.
Create a ResetCommand logical plan. Example SQL :
RESET;
Create a delimited row format properties object.
Create a delimited row format properties object.
Create SERDE row format name and properties pair.
Create SERDE row format name and properties pair.
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.
Create an AlterDatabasePropertiesCommand command.
Create an AlterDatabasePropertiesCommand command.
For example:
ALTER (DATABASE|SCHEMA) database SET DBPROPERTIES (property_name=property_value, ...);
Create an AlterTableSetLocationCommand command
Create an AlterTableSetLocationCommand command
For example:
ALTER TABLE table [PARTITION spec] SET LOCATION "loc";
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);
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;
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];
Creates a ShowCreateTableCommand
Creates a ShowCreateTableCommand
Create a ShowDatabasesCommand logical plan.
Create a ShowDatabasesCommand logical plan. Example SQL:
SHOW (DATABASES|SCHEMAS) [LIKE 'identifier_with_wildcards'];
Create a plan for a SHOW FUNCTIONS command.
Create a plan for a SHOW FUNCTIONS command.
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];
Create a ShowTablesCommand logical plan.
Create a ShowTablesCommand logical plan. Example SQL :
SHOW TABLES [(IN|FROM) database_name] [[LIKE] 'identifier_with_wildcards'];
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')];
Create a CatalogStorageFormat.
Create a CatalogStorageFormat.
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.
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.
Create a TruncateTableCommand command.
Create a TruncateTableCommand command.
For example:
TRUNCATE TABLE tablename [PARTITION (partcol1=val1, partcol2=val2 ...)]
Create an UncacheTableCommand logical plan.
Create an UncacheTableCommand logical plan.
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');
Create a SetDatabaseCommand logical plan.
Create a SetDatabaseCommand logical plan.
Create a ScriptInputOutputSchema.
Create a ScriptInputOutputSchema.
Builder that converts an ANTLR ParseTree into a LogicalPlan/Expression/TableIdentifier.