Enum Class TableCatalogCapability
- All Implemented Interfaces:
Serializable
,Comparable<TableCatalogCapability>
,Constable
TableCatalog
implementation.
TableCatalogs use TableCatalog.capabilities()
to return a set of capabilities. Each
capability signals to Spark that the catalog supports a feature identified by the capability.
For example, returning SUPPORTS_CREATE_TABLE_WITH_GENERATED_COLUMNS
allows Spark to
accept GENERATED ALWAYS AS
expressions in CREATE TABLE
statements.
- Since:
- 3.4.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionSignals that the TableCatalog supports defining column default value as expression in CREATE/REPLACE/ALTER TABLE.Signals that the TableCatalog supports defining generated columns upon table creation in SQL. -
Method Summary
Modifier and TypeMethodDescriptionstatic TableCatalogCapability
Returns the enum constant of this class with the specified name.static TableCatalogCapability[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
SUPPORTS_CREATE_TABLE_WITH_GENERATED_COLUMNS
Signals that the TableCatalog supports defining generated columns upon table creation in SQL.Without this capability, any create/replace table statements with a generated column defined in the table schema will throw an exception during analysis.
A generated column is defined with syntax:
colName colType GENERATED ALWAYS AS (expr)
Generation expression are included in the column definition for APIs like
TableCatalog.createTable(org.apache.spark.sql.connector.catalog.Identifier, org.apache.spark.sql.types.StructType, org.apache.spark.sql.connector.expressions.Transform[], java.util.Map<java.lang.String, java.lang.String>)
. SeeColumn.generationExpression()
. -
SUPPORT_COLUMN_DEFAULT_VALUE
Signals that the TableCatalog supports defining column default value as expression in CREATE/REPLACE/ALTER TABLE.Without this capability, any CREATE/REPLACE/ALTER TABLE statement with a column default value defined in the table schema will throw an exception during analysis.
A column default value is defined with syntax:
colName colType DEFAULT expr
Column default value expression is included in the column definition for APIs like
TableCatalog.createTable(org.apache.spark.sql.connector.catalog.Identifier, org.apache.spark.sql.types.StructType, org.apache.spark.sql.connector.expressions.Transform[], java.util.Map<java.lang.String, java.lang.String>)
. SeeColumn.defaultValue()
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-