Packages

package command

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. case class AddArchivesCommand(paths: Seq[String]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Adds an archive to the current session so it can be used.

  2. case class AddFilesCommand(paths: Seq[String]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Adds a file to the current session so it can be used.

  3. case class AddJarsCommand(paths: Seq[String]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Adds a jar to the current session so it can be used (for UDFs or serdes).

  4. case class AlterDatabasePropertiesCommand(databaseName: String, props: Map[String, String]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command for users to add new (key, value) pairs into DBPROPERTIES If the database does not exist, an error message will be issued to indicate the database does not exist.

    A command for users to add new (key, value) pairs into DBPROPERTIES If the database does not exist, an error message will be issued to indicate the database does not exist. The syntax of using this command in SQL is:

    ALTER (DATABASE|SCHEMA) database_name SET DBPROPERTIES (property_name=property_value, ...)
  5. case class AlterDatabaseSetLocationCommand(databaseName: String, location: String) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command for users to set new location path for a database If the database does not exist, an error message will be issued to indicate the database does not exist.

    A command for users to set new location path for a database If the database does not exist, an error message will be issued to indicate the database does not exist. The syntax of using this command in SQL is:

    ALTER (DATABASE|SCHEMA) database_name SET LOCATION path
  6. case class AlterTableAddColumnsCommand(table: TableIdentifier, colsToAdd: Seq[StructField]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command that add columns to a table The syntax of using this command in SQL is:

    A command that add columns to a table The syntax of using this command in SQL is:

    ALTER TABLE table_identifier
    ADD COLUMNS (col_name data_type [COMMENT col_comment], ...);
  7. case class AlterTableAddPartitionCommand(tableName: TableIdentifier, partitionSpecsAndLocs: Seq[(TablePartitionSpec, Option[String])], ifNotExists: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Add Partition in ALTER TABLE: add the table partitions.

    Add Partition in ALTER TABLE: add the table partitions.

    An error message will be issued if the partition exists, unless 'ifNotExists' is true.

    The syntax of this command is:

    ALTER TABLE table ADD [IF NOT EXISTS] PARTITION spec1 [LOCATION 'loc1']
                                          PARTITION spec2 [LOCATION 'loc2']
  8. case class AlterTableChangeColumnCommand(tableName: TableIdentifier, columnName: String, newColumn: StructField) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command to change the column for a table, only support changing the comment of a non-partition column for now.

    A command to change the column for a table, only support changing the comment of a non-partition column for now.

    The syntax of using this command in SQL is:

    ALTER TABLE table_identifier
    CHANGE [COLUMN] column_old_name column_new_name column_dataType [COMMENT column_comment]
    [FIRST | AFTER column_name];
  9. case class AlterTableDropPartitionCommand(tableName: TableIdentifier, specs: Seq[TablePartitionSpec], ifExists: Boolean, purge: Boolean, retainData: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Drop Partition in ALTER TABLE: to drop a particular partition for a table.

    Drop Partition in ALTER TABLE: to drop a particular partition for a table.

    This removes the data and metadata for this partition. The data is actually moved to the .Trash/Current directory if Trash is configured, unless 'purge' is true, but the metadata is completely lost. An error message will be issued if the partition does not exist, unless 'ifExists' is true. Note: purge is always false when the target is a view.

    The syntax of this command is:

    ALTER TABLE table DROP [IF EXISTS] PARTITION spec1[, PARTITION spec2, ...] [PURGE];
  10. case class AlterTableRenameCommand(oldName: TableIdentifier, newName: TableIdentifier, isView: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command that renames a table/view.

    A command that renames a table/view.

    The syntax of this command is:

    ALTER TABLE table1 RENAME TO table2;
    ALTER VIEW view1 RENAME TO view2;
  11. case class AlterTableRenamePartitionCommand(tableName: TableIdentifier, oldPartition: TablePartitionSpec, newPartition: TablePartitionSpec) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Alter a table partition's spec.

    Alter a table partition's spec.

    The syntax of this command is:

    ALTER TABLE table PARTITION spec1 RENAME TO PARTITION spec2;
  12. case class AlterTableSerDePropertiesCommand(tableName: TableIdentifier, serdeClassName: Option[String], serdeProperties: Option[Map[String, String]], partSpec: Option[TablePartitionSpec]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command that sets the serde class and/or serde properties of a table/view.

    A command that sets the serde class and/or serde properties of a table/view.

    The syntax of this command is:

    ALTER TABLE table [PARTITION spec] SET SERDE serde_name [WITH SERDEPROPERTIES props];
    ALTER TABLE table [PARTITION spec] SET SERDEPROPERTIES serde_properties;
  13. case class AlterTableSetLocationCommand(tableName: TableIdentifier, partitionSpec: Option[TablePartitionSpec], location: String) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command that sets the location of a table or a partition.

    A command that sets the location of a table or a partition.

    For normal tables, this just sets the location URI in the table/partition's storage format. For datasource tables, this sets a "path" parameter in the table/partition's serde properties.

    The syntax of this command is:

    ALTER TABLE table_name [PARTITION partition_spec] SET LOCATION "loc";
  14. case class AlterTableSetPropertiesCommand(tableName: TableIdentifier, properties: Map[String, String], isView: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command that sets table/view properties.

    A command that sets table/view properties.

    The syntax of this command is:

    ALTER TABLE table1 SET TBLPROPERTIES ('key1' = 'val1', 'key2' = 'val2', ...);
    ALTER VIEW view1 SET TBLPROPERTIES ('key1' = 'val1', 'key2' = 'val2', ...);
  15. case class AlterTableUnsetPropertiesCommand(tableName: TableIdentifier, propKeys: Seq[String], ifExists: Boolean, isView: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command that unsets table/view properties.

    A command that unsets table/view properties.

    The syntax of this command is:

    ALTER TABLE table1 UNSET TBLPROPERTIES [IF EXISTS] ('key1', 'key2', ...);
    ALTER VIEW view1 UNSET TBLPROPERTIES [IF EXISTS] ('key1', 'key2', ...);
  16. case class AlterViewAsCommand(name: TableIdentifier, originalText: String, query: LogicalPlan, isAnalyzed: Boolean = false, referredTempFunctions: Seq[String] = Seq.empty) extends LogicalPlan with RunnableCommand with AnalysisOnlyCommand with Product with Serializable

    Alter a view with given query plan.

    Alter a view with given query plan. If the view name contains database prefix, this command will alter a permanent view matching the given name, or throw an exception if view not exist. Else, this command will try to alter a temporary view first, if view not exist, try permanent view next, if still not exist, throw an exception.

    name

    the name of this view.

    originalText

    the original SQL text of this view. Note that we can only alter a view by SQL API, which means we always have originalText.

    query

    the logical plan that represents the view; this is used to generate the new view schema.

  17. case class AnalyzeColumnCommand(tableIdent: TableIdentifier, columnNames: Option[Seq[String]], allColumns: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Analyzes the given columns of the given table to generate statistics, which will be used in query optimizations.

    Analyzes the given columns of the given table to generate statistics, which will be used in query optimizations. Parameter allColumns may be specified to generate statistics of all the columns of a given table.

  18. case class AnalyzePartitionCommand(tableIdent: TableIdentifier, partitionSpec: Map[String, Option[String]], noscan: Boolean = true) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Analyzes a given set of partitions to generate per-partition statistics, which will be used in query optimizations.

    Analyzes a given set of partitions to generate per-partition statistics, which will be used in query optimizations.

    When partitionSpec is empty, statistics for all partitions are collected and stored in Metastore.

    When partitionSpec mentions only some of the partition columns, all partitions with matching values for specified columns are processed.

    If partitionSpec mentions unknown partition column, an AnalysisException is raised.

    By default, total number of rows and total size in bytes are calculated. When noscan is true, only total size in bytes is computed.

  19. case class AnalyzeTableCommand(tableIdent: TableIdentifier, noScan: Boolean = true) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Analyzes the given table to generate statistics, which will be used in query optimizations.

  20. case class AnalyzeTablesCommand(databaseName: Option[String], noScan: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Analyzes all tables in the given database to generate statistics.

  21. case class CreateDataSourceTableAsSelectCommand(table: CatalogTable, mode: SaveMode, query: LogicalPlan, outputColumnNames: Seq[String]) extends LogicalPlan with DataWritingCommand with Product with Serializable

    A command used to create a data source table using the result of a query.

    A command used to create a data source table using the result of a query.

    Note: This is different from CreateHiveTableAsSelectCommand. Please check the syntax for difference. This is not intended for temporary tables.

    The syntax of using this command in SQL is:

    CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
    USING format OPTIONS ([option1_name "option1_value", option2_name "option2_value", ...])
    AS SELECT ...
  22. case class CreateDataSourceTableCommand(table: CatalogTable, ignoreIfExists: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command used to create a data source table.

    A command used to create a data source table.

    Note: This is different from CreateTableCommand. Please check the syntax for difference. This is not intended for temporary tables.

    The syntax of using this command in SQL is:

    CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
    [(col1 data_type [COMMENT col_comment], ...)]
    USING format OPTIONS ([option1_name "option1_value", option2_name "option2_value", ...])
  23. case class CreateDatabaseCommand(databaseName: String, ifNotExists: Boolean, path: Option[String], comment: Option[String], props: Map[String, String]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command for users to create a new database.

    A command for users to create a new database.

    It will issue an error message when the database with the same name already exists, unless 'ifNotExists' is true. The syntax of using this command in SQL is:

    CREATE (DATABASE|SCHEMA) [IF NOT EXISTS] database_name
      [COMMENT database_comment]
      [LOCATION database_directory]
      [WITH DBPROPERTIES (property_name=property_value, ...)];
  24. case class CreateFunctionCommand(databaseName: Option[String], functionName: String, className: String, resources: Seq[FunctionResource], isTemp: Boolean, ignoreIfExists: Boolean, replace: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    The DDL command that creates a function.

    The DDL command that creates a function. To create a temporary function, the syntax of using this command in SQL is:

    CREATE [OR REPLACE] TEMPORARY FUNCTION functionName
    AS className [USING JAR\FILE 'uri' [, JAR|FILE 'uri']]

    To create a permanent function, the syntax in SQL is:

    CREATE [OR REPLACE] FUNCTION [IF NOT EXISTS] [databaseName.]functionName
    AS className [USING JAR\FILE 'uri' [, JAR|FILE 'uri']]
  25. case class CreateTableCommand(table: CatalogTable, ignoreIfExists: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command to create a table.

    A command to create a table.

    Note: This is currently used only for creating Hive tables. This is not intended for temporary tables.

    The syntax of using this command in SQL is:

    CREATE [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];
  26. case class CreateTableLikeCommand(targetTable: TableIdentifier, sourceTable: TableIdentifier, fileFormat: CatalogStorageFormat, provider: Option[String], properties: Map[String, String] = Map.empty, ifNotExists: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command to create a table with the same definition of the given existing table.

    A command to create a table with the same definition of the given existing table. In the target table definition, the table comment is always empty but the column comments are identical to the ones defined in the source table.

    The CatalogTable attributes copied from the source table are storage(inputFormat, outputFormat, serde, compressed, properties), schema, provider, partitionColumnNames, bucketSpec by default.

    Use "CREATE TABLE t1 LIKE t2 USING file_format" to specify new provider for t1. For Hive compatibility, use "CREATE TABLE t1 LIKE t2 STORED AS hiveFormat" to specify new file storage format (inputFormat, outputFormat, serde) for t1.

    The syntax of using this command in SQL is:

    CREATE TABLE [IF NOT EXISTS] [db_name.]table_name
    LIKE [other_db_name.]existing_table_name
    [USING provider |
     [
      [ROW FORMAT row_format]
      [STORED AS file_format] [WITH SERDEPROPERTIES (...)]
     ]
    ]
    [locationSpec]
    [TBLPROPERTIES (property_name=property_value, ...)]
  27. case class CreateViewCommand(name: TableIdentifier, userSpecifiedColumns: Seq[(String, Option[String])], comment: Option[String], properties: Map[String, String], originalText: Option[String], plan: LogicalPlan, allowExisting: Boolean, replace: Boolean, viewType: ViewType, isAnalyzed: Boolean = false, referredTempFunctions: Seq[String] = Seq.empty) extends LogicalPlan with RunnableCommand with AnalysisOnlyCommand with Product with Serializable

    Create or replace a view with given query plan.

    Create or replace a view with given query plan. This command will generate some view-specific properties(e.g. view default database, view query output column names) and store them as properties in metastore, if we need to create a permanent view.

    name

    the name of this view.

    userSpecifiedColumns

    the output column names and optional comments specified by users, can be Nil if not specified.

    comment

    the comment of this view.

    properties

    the properties of this view.

    originalText

    the original SQL text of this view, can be None if this view is created via Dataset API.

    plan

    the logical plan that represents the view; this is used to generate the logical plan for temporary view and the view schema.

    allowExisting

    if true, and if the view already exists, noop; if false, and if the view already exists, throws analysis exception.

    replace

    if true, and if the view already exists, updates it; if false, and if the view already exists, throws analysis exception.

    viewType

    the expected view type to be created with this command.

    isAnalyzed

    whether this command is analyzed or not.

  28. trait DataWritingCommand extends LogicalPlan with UnaryCommand

    A special Command which writes data out and updates metrics.

  29. case class DataWritingCommandExec(cmd: DataWritingCommand, child: SparkPlan) extends SparkPlan with UnaryExecNode with Product with Serializable

    A physical operator that executes the run method of a DataWritingCommand and saves the result to prevent multiple executions.

    A physical operator that executes the run method of a DataWritingCommand and saves the result to prevent multiple executions.

    cmd

    the DataWritingCommand this operator will run.

    child

    the physical plan child ran by the DataWritingCommand.

  30. case class DescribeColumnCommand(table: TableIdentifier, colNameParts: Seq[String], isExtended: Boolean, output: Seq[Attribute]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command to list the info for a column, including name, data type, comment and column stats.

    A command to list the info for a column, including name, data type, comment and column stats.

    The syntax of using this command in SQL is:

    DESCRIBE [EXTENDED|FORMATTED] table_name column_name;
  31. abstract class DescribeCommandBase extends LogicalPlan with LeafRunnableCommand
  32. case class DescribeDatabaseCommand(databaseName: String, extended: Boolean, output: Seq[Attribute]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command for users to show the name of the database, its comment (if one has been set), and its root location on the filesystem.

    A command for users to show the name of the database, its comment (if one has been set), and its root location on the filesystem. When extended is true, it also shows the database's properties If the database does not exist, an error message will be issued to indicate the database does not exist. The syntax of using this command in SQL is

    DESCRIBE DATABASE [EXTENDED] db_name
  33. case class DescribeFunctionCommand(info: ExpressionInfo, isExtended: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command for users to get the usage of a registered function.

    A command for users to get the usage of a registered function. The syntax of using this command in SQL is

    DESCRIBE FUNCTION [EXTENDED] upper;
  34. case class DescribeQueryCommand(queryText: String, plan: LogicalPlan) extends DescribeCommandBase with Product with Serializable

    Command that looks like

    Command that looks like

    DESCRIBE [QUERY] statement

    Parameter 'statement' can be one of the following types : 1. SELECT statements 2. SELECT statements inside set operators (UNION, INTERSECT etc) 3. VALUES statement. 4. TABLE statement. Example : TABLE table_name 5. statements of the form 'FROM table SELECT *' 6. Multi select statements of the following form: select * from (from a select * select *) 7. Common table expressions (CTEs)

  35. case class DescribeTableCommand(table: TableIdentifier, partitionSpec: TablePartitionSpec, isExtended: Boolean, output: Seq[Attribute]) extends DescribeCommandBase with Product with Serializable

    Command that looks like

    Command that looks like

    DESCRIBE [EXTENDED|FORMATTED] table_name partitionSpec?;
  36. case class DropDatabaseCommand(databaseName: String, ifExists: Boolean, cascade: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command for users to remove a database from the system.

    A command for users to remove a database from the system.

    'ifExists': - true, if database_name doesn't exist, no action - false (default), if database_name doesn't exist, a warning message will be issued 'cascade': - true, the dependent objects are automatically dropped before dropping database. - false (default), it is in the Restrict mode. The database cannot be dropped if it is not empty. The inclusive tables must be dropped at first.

    The syntax of using this command in SQL is:

    DROP DATABASE [IF EXISTS] database_name [RESTRICT|CASCADE];
  37. case class DropFunctionCommand(databaseName: Option[String], functionName: String, ifExists: Boolean, isTemp: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    The DDL command that drops a function.

    The DDL command that drops a function. ifExists: returns an error if the function doesn't exist, unless this is true. isTemp: indicates if it is a temporary function.

  38. case class DropTableCommand(tableName: TableIdentifier, ifExists: Boolean, isView: Boolean, purge: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Drops a table/view from the metastore and removes it if it is cached.

    Drops a table/view from the metastore and removes it if it is cached.

    The syntax of this command is:

    DROP TABLE [IF EXISTS] table_name;
    DROP VIEW [IF EXISTS] [db_name.]view_name;
  39. case class ExecutedCommandExec(cmd: RunnableCommand) extends SparkPlan with LeafExecNode with Product with Serializable

    A physical operator that executes the run method of a RunnableCommand and saves the result to prevent multiple executions.

    A physical operator that executes the run method of a RunnableCommand and saves the result to prevent multiple executions.

    cmd

    the RunnableCommand this operator will run.

  40. case class ExplainCommand(logicalPlan: LogicalPlan, mode: ExplainMode) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    An explain command for users to see how a command will be executed.

    An explain command for users to see how a command will be executed.

    Note that this command takes in a logical plan, runs the optimizer on the logical plan (but do NOT actually execute it).

    EXPLAIN (EXTENDED | CODEGEN | COST | FORMATTED) SELECT * FROM ...
    logicalPlan

    plan to explain

    mode

    explain mode

  41. case class ExternalCommandExecutor(runner: ExternalCommandRunner, command: String, options: Map[String, String]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Used to execute an arbitrary string command inside an external execution engine rather than Spark.

    Used to execute an arbitrary string command inside an external execution engine rather than Spark. Please check ExternalCommandRunner for more details.

  42. case class InsertIntoDataSourceDirCommand(storage: CatalogStorageFormat, provider: String, query: LogicalPlan, overwrite: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command used to write the result of a query to a directory.

    A command used to write the result of a query to a directory.

    The syntax of using this command in SQL is:

    INSERT OVERWRITE DIRECTORY (path=STRING)?
    USING format OPTIONS ([option1_name "option1_value", option2_name "option2_value", ...])
    SELECT ...
    storage

    storage format used to describe how the query result is stored.

    provider

    the data source type to be used

    query

    the logical plan representing data to write to

    overwrite

    whether overwrites existing directory

  43. trait LeafRunnableCommand extends LogicalPlan with RunnableCommand with LeafLike[LogicalPlan]
  44. case class ListArchivesCommand(archives: Seq[String] = Seq.empty[String]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Returns a list of archive paths that are added to resources.

    Returns a list of archive paths that are added to resources. If archive paths are provided, return the ones that are added to resources.

  45. case class ListFilesCommand(files: Seq[String] = Seq.empty[String]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Returns a list of file paths that are added to resources.

    Returns a list of file paths that are added to resources. If file paths are provided, return the ones that are added to resources.

  46. case class ListJarsCommand(jars: Seq[String] = Seq.empty[String]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Returns a list of jar files that are added to resources.

    Returns a list of jar files that are added to resources. If jar files are provided, return the ones that are added to resources.

  47. case class LoadDataCommand(table: TableIdentifier, path: String, isLocal: Boolean, isOverwrite: Boolean, partition: Option[TablePartitionSpec]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command that loads data into a Hive table.

    A command that loads data into a Hive table.

    The syntax of this command is:

    LOAD DATA [LOCAL] INPATH 'filepath' [OVERWRITE] INTO TABLE tablename
    [PARTITION (partcol1=val1, partcol2=val2 ...)]
  48. case class PartitionStatistics(numFiles: Int, totalSize: Long) extends Product with Serializable
  49. class PathFilterIgnoreNonData extends PathFilter with Serializable

    For the purpose of calculating total directory sizes, use this filter to ignore some irrelevant files.

  50. case class RefreshFunctionCommand(databaseName: Option[String], functionName: String) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command for users to refresh the persistent function.

    A command for users to refresh the persistent function. The syntax of using this command in SQL is:

    REFRESH FUNCTION functionName
  51. case class RefreshTableCommand(tableIdent: TableIdentifier) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command to refresh all cached entries associated with the table.

    A command to refresh all cached entries associated with the table.

    The syntax of using this command in SQL is:

    REFRESH TABLE [db_name.]table_name
  52. case class RepairTableCommand(tableName: TableIdentifier, enableAddPartitions: Boolean, enableDropPartitions: Boolean, cmd: String = "MSCK REPAIR TABLE") extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    Repair a table by recovering all the partition in the directory of the table and update the catalog.

    Repair a table by recovering all the partition in the directory of the table and update the catalog.

    The syntax of this command is:

    ALTER TABLE table RECOVER PARTITIONS;
    MSCK REPAIR TABLE table [{ADD|DROP|SYNC} PARTITIONS];
  53. case class ResetCommand(config: Option[String]) extends LogicalPlan with LeafRunnableCommand with IgnoreCachedData with Product with Serializable

    This command is for resetting SQLConf to the default values.

    This command is for resetting SQLConf to the default values. Any configurations that were set via SetCommand will get reset to default value. Command that runs

    reset;
    reset spark.sql.session.timeZone;
  54. trait RunnableCommand extends LogicalPlan with Command

    A logical command that is executed for its side-effects.

    A logical command that is executed for its side-effects. RunnableCommands are wrapped in ExecutedCommand during execution.

  55. case class SetCatalogCommand(catalogName: String) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    The command for SET CATALOG XXX

  56. case class SetCommand(kv: Option[(String, Option[String])]) extends LogicalPlan with LeafRunnableCommand with Logging with Product with Serializable

    Command that runs

    Command that runs

    set key = value;
    set -v;
    set;
  57. case class SetNamespaceCommand(namespace: Seq[String]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    The command for USE NAMESPACE XXX

  58. case class ShowCatalogsCommand(pattern: Option[String]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    The command for SHOW CATALOGS.

  59. case class ShowColumnsCommand(databaseName: Option[String], tableName: TableIdentifier, output: Seq[Attribute]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command to list the column names for a table.

    A command to list the column names for a table.

    The syntax of using this command in SQL is:

    SHOW COLUMNS (FROM | IN) table_identifier [(FROM | IN) database];
  60. case class ShowCreateTableAsSerdeCommand(table: TableIdentifier, output: Seq[Attribute]) extends LogicalPlan with LeafRunnableCommand with ShowCreateTableCommandBase with Product with Serializable

    This commands generates the DDL for Hive serde table.

    This commands generates the DDL for Hive serde table.

    The syntax of using this command in SQL is:

    SHOW CREATE TABLE table_identifier AS SERDE;
  61. case class ShowCreateTableCommand(table: TableIdentifier, output: Seq[Attribute]) extends LogicalPlan with LeafRunnableCommand with ShowCreateTableCommandBase with Product with Serializable

    A command that shows the Spark DDL syntax that can be used to create a given table.

    A command that shows the Spark DDL syntax that can be used to create a given table. For Hive serde table, this command will generate Spark DDL that can be used to create corresponding Spark table.

    The syntax of using this command in SQL is:

    SHOW CREATE TABLE [db_name.]table_name
  62. trait ShowCreateTableCommandBase extends AnyRef

    Provides common utilities between ShowCreateTableCommand and ShowCreateTableAsSparkCommand.

  63. case class ShowCurrentNamespaceCommand() extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    The command for SHOW CURRENT NAMESPACE.

  64. case class ShowFunctionsCommand(db: String, pattern: Option[String], showUserFunctions: Boolean, showSystemFunctions: Boolean, output: Seq[Attribute]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command for users to list all of the registered functions.

    A command for users to list all of the registered functions. The syntax of using this command in SQL is:

    SHOW FUNCTIONS [LIKE pattern]

    For the pattern, '*' matches any sequence of characters (including no characters) and '|' is for alternation. For example, "show functions like 'yea*|windo*'" will return "window" and "year".

  65. case class ShowPartitionsCommand(tableName: TableIdentifier, output: Seq[Attribute], spec: Option[TablePartitionSpec]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command to list the partition names of a table.

    A command to list the partition names of a table. If the partition spec is specified, partitions that match the spec are returned. AnalysisException exception is thrown under the following conditions:

    1. If the command is called for a non partitioned table. 2. If the partition spec refers to the columns that are not defined as partitioning columns.

    The syntax of using this command in SQL is:

    SHOW PARTITIONS [db_name.]table_name [PARTITION(partition_spec)]
  66. case class ShowTablePropertiesCommand(table: TableIdentifier, propertyKey: Option[String], output: Seq[Attribute]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    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')];
  67. case class ShowTablesCommand(databaseName: Option[String], tableIdentifierPattern: Option[String], output: Seq[Attribute], isExtended: Boolean = false, partitionSpec: Option[TablePartitionSpec] = None) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command for users to get tables in the given database.

    A command for users to get tables in the given database. If a databaseName is not given, the current database will be used. The syntax of using this command in SQL is:

    SHOW TABLES [(IN|FROM) database_name] [[LIKE] 'identifier_with_wildcards'];
    SHOW TABLE EXTENDED [(IN|FROM) database_name] LIKE 'identifier_with_wildcards'
    [PARTITION(partition_spec)];
  68. case class ShowViewsCommand(databaseName: String, tableIdentifierPattern: Option[String], output: Seq[Attribute]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command for users to get views in the given database.

    A command for users to get views in the given database. If a databaseName is not given, the current database will be used. The syntax of using this command in SQL is:

    SHOW VIEWS [(IN|FROM) database_name] [[LIKE] 'identifier_with_wildcards'];
  69. case class StreamingExplainCommand(queryExecution: IncrementalExecution, extended: Boolean) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    An explain command for users to see how a streaming batch is executed.

  70. case class TruncateTableCommand(tableName: TableIdentifier, partitionSpec: Option[TablePartitionSpec]) extends LogicalPlan with LeafRunnableCommand with Product with Serializable

    A command to truncate table.

    A command to truncate table.

    The syntax of this command is:

    TRUNCATE TABLE tablename [PARTITION (partcol1=val1, partcol2=val2 ...)]

Value Members

  1. case object ClearCacheCommand extends LogicalPlan with LeafRunnableCommand with IgnoreCachedData with Product with Serializable

    Clear all cached data from the in-memory cache.

  2. object CommandCheck extends (LogicalPlan) => Unit with SQLConfHelper

    Checks legitimization of various execution commands.

  3. object CommandUtils extends Logging
  4. object DDLUtils extends Logging
  5. object DataWritingCommand
  6. object LoadDataCommand extends Serializable
  7. object SetCommand extends Serializable
  8. object ViewHelper extends SQLConfHelper with Logging

Ungrouped