Determine if a plan should be explained at all.
Determine if a plan should be explained at all.
Create an AddJar or AddFile command depending on the requested resource.
Create an AddJar or AddFile command depending on the requested resource.
Create an AlterTableAddPartition command.
Create an AlterTableAddPartition 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 AnalyzeTable command.
Create an AnalyzeTable 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 CreateDatabase command.
Create a CreateDatabase 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.
Create a CreateFunction command.
Create a CreateFunction 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 CreateTable or a CreateTableAsSelectLogicalPlan.
Create a table, returning either a CreateTable or a CreateTableAsSelectLogicalPlan.
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 [TEMPORARY] [EXTERNAL] TABLE [IF NOT EXISTS] [db_name.]table_name [(col1 data_type [COMMENT col_comment], ...)] [COMMENT table_comment] [PARTITIONED BY (col3 data_type [COMMENT col_comment], ...)] [CLUSTERED BY (col1, ...) [SORTED BY (col1 [ASC|DESC], ...)] INTO num_buckets BUCKETS] [SKEWED BY (col1, col2, ...) ON ((col_value, col_value, ...), ...) [STORED AS DIRECTORIES]] [ROW FORMAT row_format] [STORED AS file_format | STORED BY storage_handler_class [WITH SERDEPROPERTIES (...)]] [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 CreateTableLike command.
Create a CreateTableLike 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.
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 DescribeDatabase command.
Create a DescribeDatabase command.
For example:
DESCRIBE DATABASE [EXTENDED] database;
Create a DescribeTableCommand logical plan.
Create a DescribeTableCommand logical plan.
Create a DropDatabase command.
Create a DropDatabase command.
For example:
DROP (DATABASE|SCHEMA) [IF EXISTS] database [RESTRICT|CASCADE];
Create a DropFunction command.
Create a DropFunction command.
For example:
DROP [TEMPORARY] FUNCTION [IF EXISTS] function;
Create a DropTable command.
Create a DropTable command.
Create an AlterTableDropPartition command
Create an AlterTableDropPartition 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 LoadData command.
Create a LoadData command.
For example:
LOAD DATA [LOCAL] INPATH 'filepath' [OVERWRITE] INTO TABLE tablename [PARTITION (partcol1=val1, partcol2=val2 ...)]
Create location string.
Create location string.
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 AlterTableRename command.
Create a AlterTableRename command.
For example:
ALTER TABLE table1 RENAME TO table2; ALTER VIEW view1 RENAME TO view2;
Create an AlterTableRenamePartition command
Create an AlterTableRenamePartition command
For example:
ALTER TABLE table PARTITION spec1 RENAME TO PARTITION spec2;
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 AlterDatabaseProperties command.
Create an AlterDatabaseProperties command.
For example:
ALTER (DATABASE|SCHEMA) database SET DBPROPERTIES (property_name=property_value, ...);
Create an AlterTableSetLocation command
Create an AlterTableSetLocation command
For example:
ALTER TABLE table [PARTITION spec] SET LOCATION "loc";
Create an AlterTableSetProperties command.
Create an AlterTableSetProperties command.
For example:
ALTER TABLE table SET TBLPROPERTIES ('comment' = new_comment); ALTER VIEW view SET TBLPROPERTIES ('comment' = new_comment);
Create an AlterTableSerDeProperties command.
Create an AlterTableSerDeProperties 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'];
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.
Create an UncacheTableCommand logical plan.
Create an UncacheTableCommand logical plan.
Create an AlterTableUnsetProperties command.
Create an AlterTableUnsetProperties 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.