Class AlterTableRequest
- java.lang.Object
-
- com.gpudb.protocol.AlterTableRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class AlterTableRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.alterTable.Apply various modifications to a table or view. The available modifications include the following:
Manage a table's columns--a column can be added, removed, or have its type and properties modified, including whether it is dictionary encoded or not.
External tables cannot be modified except for their refresh method.
Create or delete a column, low-cardinality index, chunk skip, geospatial, CAGRA, or HNSW index. This can speed up certain operations when using expressions containing equality or relational operators on indexed columns. This only applies to tables.
Create or delete a foreign key on a particular column.
Manage a range-partitioned or a manual list-partitioned table's partitions.
Set (or reset) the tier strategy of a table or view.
Refresh and manage the refresh mode of a materialized view or an external table.
Set the time-to-live (TTL). This can be applied to tables or views.
Set the global access mode (i.e. locking) for a table. This setting trumps any role-based access controls that may be in place; e.g., a user with write access to a table marked read-only will not be able to insert records into it. The mode can be set to read-only, write-only, read/write, and no access.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAlterTableRequest.ActionA set of string constants for theAlterTableRequestparameteraction.static classAlterTableRequest.OptionsA set of string constants for theAlterTableRequestparameteroptions.
-
Constructor Summary
Constructors Constructor Description AlterTableRequest()Constructs an AlterTableRequest object with default parameters.AlterTableRequest(String tableName, String action, String value, Map<String,String> options)Constructs an AlterTableRequest object with the specified parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.StringgetAction()Modification operation to be applied.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.Map<String,String>getOptions()Optional parameters.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetTableName()Table on which the operation will be performed, in [schema_name.]table_name format, using standard name resolution rules.StringgetValue()The value of the modification, depending onaction.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.AlterTableRequestsetAction(String action)Modification operation to be applied.AlterTableRequestsetOptions(Map<String,String> options)Optional parameters.AlterTableRequestsetTableName(String tableName)Table on which the operation will be performed, in [schema_name.]table_name format, using standard name resolution rules.AlterTableRequestsetValue(String value)The value of the modification, depending onaction.StringtoString()
-
-
-
Constructor Detail
-
AlterTableRequest
public AlterTableRequest()
Constructs an AlterTableRequest object with default parameters.
-
AlterTableRequest
public AlterTableRequest(String tableName, String action, String value, Map<String,String> options)
Constructs an AlterTableRequest object with the specified parameters.- Parameters:
tableName- Table on which the operation will be performed, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table or view.action- Modification operation to be applied. Supported values:CREATE_INDEX: Creates a column (attribute) index, low-cardinality index, chunk skip index, geospatial index, CAGRA index, or HNSW index (depending on the specifiedINDEX_TYPE), on the column name specified invalue. If this column already has the specified index, an error will be returned.REFRESH_INDEX: Refreshes an index identified byINDEX_TYPE, on the column name specified invalue. Currently applicable only to CAGRA indices.DELETE_INDEX: Deletes a column (attribute) index, low-cardinality index, chunk skip index, geospatial index, CAGRA index, or HNSW index (depending on the specifiedINDEX_TYPE), on the column name specified invalue. If this column does not have the specified index, an error will be returned.MOVE_TO_COLLECTION: [DEPRECATED--please useMOVE_TO_SCHEMAand useGPUdb.createSchemato create the schema if non-existent] Moves a table or view into a schema namedvalue. If the schema provided is non-existent, it will be automatically created.MOVE_TO_SCHEMA: Moves a table or view into a schema namedvalue. If the schema provided is nonexistent, an error will be thrown. Ifvalueis empty, then the table or view will be placed in the user's default schema.PROTECTED: No longer used. Previously set whether the giventableNameshould be protected or not. Thevaluewould have been either 'true' or 'false'.RENAME_TABLE: Renames a table or view tovalue. Has the same naming restrictions as tables.TTL: Sets the time-to-live in minutes of the table or view specified intableName.ADD_COMMENT: Adds the comment specified invalueto the table specified intableName. UseCOLUMN_NAMEto set the comment for a column.ADD_COLUMN: Adds the column specified invalueto the table specified intableName. UseCOLUMN_TYPEandCOLUMN_PROPERTIESinoptionsto set the column's type and properties, respectively.CHANGE_COLUMN: Changes type and properties of the column specified invalue. UseCOLUMN_TYPEandCOLUMN_PROPERTIESinoptionsto set the column's type and properties, respectively. Note that primary key and/or shard key columns cannot be changed. All unchanging column properties must be listed for the change to take place, e.g., to add dictionary encoding to an existing 'char4' column, both 'char4' and 'dict' must be specified in theoptionsmap.DELETE_COLUMN: Deletes the column specified invaluefrom the table specified intableName.CREATE_FOREIGN_KEY: Creates a foreign key specified invalueusing the format '(source_column_name [, ...]) references target_table_name(primary_key_column_name [, ...]) [as foreign_key_name]'.DELETE_FOREIGN_KEY: Deletes a foreign key. Thevalueshould be the foreign_key_name specified when creating the key or the complete string used to define it.ADD_PARTITION: Adds the partition specified invalue, to either a range-partitioned or manual list-partitioned table.REMOVE_PARTITION: Removes the partition specified invalue(and relocates all of its data to the default partition) from either a range-partitioned or manual list-partitioned table.DELETE_PARTITION: Deletes the partition specified invalue(and all of its data) from either a range-partitioned or manual list-partitioned table.SET_GLOBAL_ACCESS_MODE: Sets the global access mode (i.e. locking) for the table specified intableName. Specify the access mode invalue. Valid modes are 'no_access', 'read_only', 'write_only' and 'read_write'.REFRESH: For a materialized view, replays all the table creation commands required to create the view. For an external table, reloads all data in the table from its associated source files or data source.SET_REFRESH_METHOD: For a materialized view, sets the method by which the view is refreshed to the method specified invalue- one of 'manual', 'periodic', or 'on_change'. For an external table, sets the method by which the table is refreshed to the method specified invalue- either 'manual' or 'on_start'.SET_REFRESH_START_TIME: Sets the time to start periodic refreshes of this materialized view to the datetime string specified invaluewith format 'YYYY-MM-DD HH:MM:SS'. Subsequent refreshes occur at the specified time + N * the refresh period.SET_REFRESH_STOP_TIME: Sets the time to stop periodic refreshes of this materialized view to the datetime string specified invaluewith format 'YYYY-MM-DD HH:MM:SS'.SET_REFRESH_PERIOD: Sets the time interval in seconds at which to refresh this materialized view to the value specified invalue. Also, sets the refresh method to periodic if not already set.SET_REFRESH_SPAN: Sets the future time-offset(in seconds) for the view refresh to stop.SET_REFRESH_EXECUTE_AS: Sets the user name to refresh this materialized view to the value specified invalue.REMOVE_TEXT_SEARCH_ATTRIBUTES: Removes text search attribute from all columns.REMOVE_SHARD_KEYS: Removes the shard key property from all columns, so that the table will be considered randomly sharded. The data is not moved. Thevalueis ignored.SET_STRATEGY_DEFINITION: Sets the tier strategy for the table and its columns to the one specified invalue, replacing the existing tier strategy in its entirety.CANCEL_DATASOURCE_SUBSCRIPTION: Permanently unsubscribe a data source that is loading continuously as a stream. The data source can be Kafka / S3 / Azure.DROP_DATASOURCE_SUBSCRIPTION: Permanently delete a cancelled data source subscription.PAUSE_DATASOURCE_SUBSCRIPTION: Temporarily unsubscribe a data source that is loading continuously as a stream. The data source can be Kafka / S3 / Azure.RESUME_DATASOURCE_SUBSCRIPTION: Resubscribe to a paused data source subscription. The data source can be Kafka / S3 / Azure.CHANGE_OWNER: Change the owner resource group of the table.SET_LOAD_VECTORS_POLICY: Set startup data loading scheme for the table; see description of 'load_vectors_policy' inGPUdb.createTablefor possible values forvalueSET_BUILD_PK_INDEX_POLICY: Set startup primary key generation scheme for the table; see description of 'build_pk_index_policy' inGPUdb.createTablefor possible values forvalueSET_BUILD_MATERIALIZED_VIEW_POLICY: Set startup rebuilding scheme for the materialized view; see description of 'build_materialized_view_policy' inGPUdb.createMaterializedViewfor possible values forvalue
value- The value of the modification, depending onaction. For example, ifactionisADD_COLUMN, this would be the column name; while the column's definition would be covered by theCOLUMN_TYPE,COLUMN_PROPERTIES,COLUMN_DEFAULT_VALUE, andADD_COLUMN_EXPRESSIONinoptions. IfactionisTTL, it would be the number of minutes for the new TTL. IfactionisREFRESH, this field would be blank.options- Optional parameters.ACTIONCOLUMN_NAMETABLE_NAMECOLUMN_DEFAULT_VALUE: When adding a column, set a default value for existing records. For nullable columns, the default value will be null, regardless of data type.COLUMN_PROPERTIES: When adding or changing a column, set the column properties (strings, separated by a comma: data, text_search, char8, int8 etc).COLUMN_TYPE: When adding or changing a column, set the column type (strings, separated by a comma: int, double, string, null etc).COPY_VALUES_FROM_COLUMN: [DEPRECATED--please useADD_COLUMN_EXPRESSIONinstead.]RENAME_COLUMN: When changing a column, specify new column name.VALIDATE_CHANGE_COLUMN: When changing a column, validate the change before applying it (or not). Supported values:TRUE: Validate all values. A value too large (or too long) for the new type will prevent any change.FALSE: When a value is too large or long, it will be truncated.
TRUE.UPDATE_LAST_ACCESS_TIME: Indicates whether the time-to-live (TTL) expiration countdown timer should be reset to the table's TTL. Supported values:TRUE: Reset the expiration countdown timer to the table's configured TTL.FALSE: Don't reset the timer; expiration countdown will continue from where it is, as if the table had not been accessed.
TRUE.ADD_COLUMN_EXPRESSION: When adding a column, an optional expression to use for the new column's values. Any valid expression may be used, including one containing references to existing columns in the same table.STRATEGY_DEFINITION: Optional parameter for specifying the tier strategy for the table and its columns whenactionisSET_STRATEGY_DEFINITION, replacing the existing tier strategy in its entirety.INDEX_TYPE: Type of index to create, whenactionisCREATE_INDEX; to refresh, whenactionisREFRESH_INDEX; or to delete, whenactionisDELETE_INDEX. Supported values:COLUMN: Create or delete a column (attribute) index.LOW_CARDINALITY: Create a low-cardinality column (attribute) index.CHUNK_SKIP: Create or delete a chunk skip index.GEOSPATIAL: Create or delete a geospatial indexCAGRA: Create or delete a CAGRA index on a vector columnHNSW: Create or delete an HNSW index on a vector column
COLUMN.INDEX_OPTIONS: Options to use when creating an index, in the format "key: value [, key: value [, ...]]". Valid options vary by index type.
Map.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getTableName
public String getTableName()
Table on which the operation will be performed, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table or view.- Returns:
- The current value of
tableName.
-
setTableName
public AlterTableRequest setTableName(String tableName)
Table on which the operation will be performed, in [schema_name.]table_name format, using standard name resolution rules. Must be an existing table or view.- Parameters:
tableName- The new value fortableName.- Returns:
thisto mimic the builder pattern.
-
getAction
public String getAction()
Modification operation to be applied. Supported values:CREATE_INDEX: Creates a column (attribute) index, low-cardinality index, chunk skip index, geospatial index, CAGRA index, or HNSW index (depending on the specifiedINDEX_TYPE), on the column name specified invalue. If this column already has the specified index, an error will be returned.REFRESH_INDEX: Refreshes an index identified byINDEX_TYPE, on the column name specified invalue. Currently applicable only to CAGRA indices.DELETE_INDEX: Deletes a column (attribute) index, low-cardinality index, chunk skip index, geospatial index, CAGRA index, or HNSW index (depending on the specifiedINDEX_TYPE), on the column name specified invalue. If this column does not have the specified index, an error will be returned.MOVE_TO_COLLECTION: [DEPRECATED--please useMOVE_TO_SCHEMAand useGPUdb.createSchemato create the schema if non-existent] Moves a table or view into a schema namedvalue. If the schema provided is non-existent, it will be automatically created.MOVE_TO_SCHEMA: Moves a table or view into a schema namedvalue. If the schema provided is nonexistent, an error will be thrown. Ifvalueis empty, then the table or view will be placed in the user's default schema.PROTECTED: No longer used. Previously set whether the giventableNameshould be protected or not. Thevaluewould have been either 'true' or 'false'.RENAME_TABLE: Renames a table or view tovalue. Has the same naming restrictions as tables.TTL: Sets the time-to-live in minutes of the table or view specified intableName.ADD_COMMENT: Adds the comment specified invalueto the table specified intableName. UseCOLUMN_NAMEto set the comment for a column.ADD_COLUMN: Adds the column specified invalueto the table specified intableName. UseCOLUMN_TYPEandCOLUMN_PROPERTIESinoptionsto set the column's type and properties, respectively.CHANGE_COLUMN: Changes type and properties of the column specified invalue. UseCOLUMN_TYPEandCOLUMN_PROPERTIESinoptionsto set the column's type and properties, respectively. Note that primary key and/or shard key columns cannot be changed. All unchanging column properties must be listed for the change to take place, e.g., to add dictionary encoding to an existing 'char4' column, both 'char4' and 'dict' must be specified in theoptionsmap.DELETE_COLUMN: Deletes the column specified invaluefrom the table specified intableName.CREATE_FOREIGN_KEY: Creates a foreign key specified invalueusing the format '(source_column_name [, ...]) references target_table_name(primary_key_column_name [, ...]) [as foreign_key_name]'.DELETE_FOREIGN_KEY: Deletes a foreign key. Thevalueshould be the foreign_key_name specified when creating the key or the complete string used to define it.ADD_PARTITION: Adds the partition specified invalue, to either a range-partitioned or manual list-partitioned table.REMOVE_PARTITION: Removes the partition specified invalue(and relocates all of its data to the default partition) from either a range-partitioned or manual list-partitioned table.DELETE_PARTITION: Deletes the partition specified invalue(and all of its data) from either a range-partitioned or manual list-partitioned table.SET_GLOBAL_ACCESS_MODE: Sets the global access mode (i.e. locking) for the table specified intableName. Specify the access mode invalue. Valid modes are 'no_access', 'read_only', 'write_only' and 'read_write'.REFRESH: For a materialized view, replays all the table creation commands required to create the view. For an external table, reloads all data in the table from its associated source files or data source.SET_REFRESH_METHOD: For a materialized view, sets the method by which the view is refreshed to the method specified invalue- one of 'manual', 'periodic', or 'on_change'. For an external table, sets the method by which the table is refreshed to the method specified invalue- either 'manual' or 'on_start'.SET_REFRESH_START_TIME: Sets the time to start periodic refreshes of this materialized view to the datetime string specified invaluewith format 'YYYY-MM-DD HH:MM:SS'. Subsequent refreshes occur at the specified time + N * the refresh period.SET_REFRESH_STOP_TIME: Sets the time to stop periodic refreshes of this materialized view to the datetime string specified invaluewith format 'YYYY-MM-DD HH:MM:SS'.SET_REFRESH_PERIOD: Sets the time interval in seconds at which to refresh this materialized view to the value specified invalue. Also, sets the refresh method to periodic if not already set.SET_REFRESH_SPAN: Sets the future time-offset(in seconds) for the view refresh to stop.SET_REFRESH_EXECUTE_AS: Sets the user name to refresh this materialized view to the value specified invalue.REMOVE_TEXT_SEARCH_ATTRIBUTES: Removes text search attribute from all columns.REMOVE_SHARD_KEYS: Removes the shard key property from all columns, so that the table will be considered randomly sharded. The data is not moved. Thevalueis ignored.SET_STRATEGY_DEFINITION: Sets the tier strategy for the table and its columns to the one specified invalue, replacing the existing tier strategy in its entirety.CANCEL_DATASOURCE_SUBSCRIPTION: Permanently unsubscribe a data source that is loading continuously as a stream. The data source can be Kafka / S3 / Azure.DROP_DATASOURCE_SUBSCRIPTION: Permanently delete a cancelled data source subscription.PAUSE_DATASOURCE_SUBSCRIPTION: Temporarily unsubscribe a data source that is loading continuously as a stream. The data source can be Kafka / S3 / Azure.RESUME_DATASOURCE_SUBSCRIPTION: Resubscribe to a paused data source subscription. The data source can be Kafka / S3 / Azure.CHANGE_OWNER: Change the owner resource group of the table.SET_LOAD_VECTORS_POLICY: Set startup data loading scheme for the table; see description of 'load_vectors_policy' inGPUdb.createTablefor possible values forvalueSET_BUILD_PK_INDEX_POLICY: Set startup primary key generation scheme for the table; see description of 'build_pk_index_policy' inGPUdb.createTablefor possible values forvalueSET_BUILD_MATERIALIZED_VIEW_POLICY: Set startup rebuilding scheme for the materialized view; see description of 'build_materialized_view_policy' inGPUdb.createMaterializedViewfor possible values forvalue
- Returns:
- The current value of
action.
-
setAction
public AlterTableRequest setAction(String action)
Modification operation to be applied. Supported values:CREATE_INDEX: Creates a column (attribute) index, low-cardinality index, chunk skip index, geospatial index, CAGRA index, or HNSW index (depending on the specifiedINDEX_TYPE), on the column name specified invalue. If this column already has the specified index, an error will be returned.REFRESH_INDEX: Refreshes an index identified byINDEX_TYPE, on the column name specified invalue. Currently applicable only to CAGRA indices.DELETE_INDEX: Deletes a column (attribute) index, low-cardinality index, chunk skip index, geospatial index, CAGRA index, or HNSW index (depending on the specifiedINDEX_TYPE), on the column name specified invalue. If this column does not have the specified index, an error will be returned.MOVE_TO_COLLECTION: [DEPRECATED--please useMOVE_TO_SCHEMAand useGPUdb.createSchemato create the schema if non-existent] Moves a table or view into a schema namedvalue. If the schema provided is non-existent, it will be automatically created.MOVE_TO_SCHEMA: Moves a table or view into a schema namedvalue. If the schema provided is nonexistent, an error will be thrown. Ifvalueis empty, then the table or view will be placed in the user's default schema.PROTECTED: No longer used. Previously set whether the giventableNameshould be protected or not. Thevaluewould have been either 'true' or 'false'.RENAME_TABLE: Renames a table or view tovalue. Has the same naming restrictions as tables.TTL: Sets the time-to-live in minutes of the table or view specified intableName.ADD_COMMENT: Adds the comment specified invalueto the table specified intableName. UseCOLUMN_NAMEto set the comment for a column.ADD_COLUMN: Adds the column specified invalueto the table specified intableName. UseCOLUMN_TYPEandCOLUMN_PROPERTIESinoptionsto set the column's type and properties, respectively.CHANGE_COLUMN: Changes type and properties of the column specified invalue. UseCOLUMN_TYPEandCOLUMN_PROPERTIESinoptionsto set the column's type and properties, respectively. Note that primary key and/or shard key columns cannot be changed. All unchanging column properties must be listed for the change to take place, e.g., to add dictionary encoding to an existing 'char4' column, both 'char4' and 'dict' must be specified in theoptionsmap.DELETE_COLUMN: Deletes the column specified invaluefrom the table specified intableName.CREATE_FOREIGN_KEY: Creates a foreign key specified invalueusing the format '(source_column_name [, ...]) references target_table_name(primary_key_column_name [, ...]) [as foreign_key_name]'.DELETE_FOREIGN_KEY: Deletes a foreign key. Thevalueshould be the foreign_key_name specified when creating the key or the complete string used to define it.ADD_PARTITION: Adds the partition specified invalue, to either a range-partitioned or manual list-partitioned table.REMOVE_PARTITION: Removes the partition specified invalue(and relocates all of its data to the default partition) from either a range-partitioned or manual list-partitioned table.DELETE_PARTITION: Deletes the partition specified invalue(and all of its data) from either a range-partitioned or manual list-partitioned table.SET_GLOBAL_ACCESS_MODE: Sets the global access mode (i.e. locking) for the table specified intableName. Specify the access mode invalue. Valid modes are 'no_access', 'read_only', 'write_only' and 'read_write'.REFRESH: For a materialized view, replays all the table creation commands required to create the view. For an external table, reloads all data in the table from its associated source files or data source.SET_REFRESH_METHOD: For a materialized view, sets the method by which the view is refreshed to the method specified invalue- one of 'manual', 'periodic', or 'on_change'. For an external table, sets the method by which the table is refreshed to the method specified invalue- either 'manual' or 'on_start'.SET_REFRESH_START_TIME: Sets the time to start periodic refreshes of this materialized view to the datetime string specified invaluewith format 'YYYY-MM-DD HH:MM:SS'. Subsequent refreshes occur at the specified time + N * the refresh period.SET_REFRESH_STOP_TIME: Sets the time to stop periodic refreshes of this materialized view to the datetime string specified invaluewith format 'YYYY-MM-DD HH:MM:SS'.SET_REFRESH_PERIOD: Sets the time interval in seconds at which to refresh this materialized view to the value specified invalue. Also, sets the refresh method to periodic if not already set.SET_REFRESH_SPAN: Sets the future time-offset(in seconds) for the view refresh to stop.SET_REFRESH_EXECUTE_AS: Sets the user name to refresh this materialized view to the value specified invalue.REMOVE_TEXT_SEARCH_ATTRIBUTES: Removes text search attribute from all columns.REMOVE_SHARD_KEYS: Removes the shard key property from all columns, so that the table will be considered randomly sharded. The data is not moved. Thevalueis ignored.SET_STRATEGY_DEFINITION: Sets the tier strategy for the table and its columns to the one specified invalue, replacing the existing tier strategy in its entirety.CANCEL_DATASOURCE_SUBSCRIPTION: Permanently unsubscribe a data source that is loading continuously as a stream. The data source can be Kafka / S3 / Azure.DROP_DATASOURCE_SUBSCRIPTION: Permanently delete a cancelled data source subscription.PAUSE_DATASOURCE_SUBSCRIPTION: Temporarily unsubscribe a data source that is loading continuously as a stream. The data source can be Kafka / S3 / Azure.RESUME_DATASOURCE_SUBSCRIPTION: Resubscribe to a paused data source subscription. The data source can be Kafka / S3 / Azure.CHANGE_OWNER: Change the owner resource group of the table.SET_LOAD_VECTORS_POLICY: Set startup data loading scheme for the table; see description of 'load_vectors_policy' inGPUdb.createTablefor possible values forvalueSET_BUILD_PK_INDEX_POLICY: Set startup primary key generation scheme for the table; see description of 'build_pk_index_policy' inGPUdb.createTablefor possible values forvalueSET_BUILD_MATERIALIZED_VIEW_POLICY: Set startup rebuilding scheme for the materialized view; see description of 'build_materialized_view_policy' inGPUdb.createMaterializedViewfor possible values forvalue
- Parameters:
action- The new value foraction.- Returns:
thisto mimic the builder pattern.
-
getValue
public String getValue()
The value of the modification, depending onaction. For example, ifactionisADD_COLUMN, this would be the column name; while the column's definition would be covered by theCOLUMN_TYPE,COLUMN_PROPERTIES,COLUMN_DEFAULT_VALUE, andADD_COLUMN_EXPRESSIONinoptions. IfactionisTTL, it would be the number of minutes for the new TTL. IfactionisREFRESH, this field would be blank.- Returns:
- The current value of
value.
-
setValue
public AlterTableRequest setValue(String value)
The value of the modification, depending onaction. For example, ifactionisADD_COLUMN, this would be the column name; while the column's definition would be covered by theCOLUMN_TYPE,COLUMN_PROPERTIES,COLUMN_DEFAULT_VALUE, andADD_COLUMN_EXPRESSIONinoptions. IfactionisTTL, it would be the number of minutes for the new TTL. IfactionisREFRESH, this field would be blank.- Parameters:
value- The new value forvalue.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.ACTIONCOLUMN_NAMETABLE_NAMECOLUMN_DEFAULT_VALUE: When adding a column, set a default value for existing records. For nullable columns, the default value will be null, regardless of data type.COLUMN_PROPERTIES: When adding or changing a column, set the column properties (strings, separated by a comma: data, text_search, char8, int8 etc).COLUMN_TYPE: When adding or changing a column, set the column type (strings, separated by a comma: int, double, string, null etc).COPY_VALUES_FROM_COLUMN: [DEPRECATED--please useADD_COLUMN_EXPRESSIONinstead.]RENAME_COLUMN: When changing a column, specify new column name.VALIDATE_CHANGE_COLUMN: When changing a column, validate the change before applying it (or not). Supported values:TRUE: Validate all values. A value too large (or too long) for the new type will prevent any change.FALSE: When a value is too large or long, it will be truncated.
TRUE.UPDATE_LAST_ACCESS_TIME: Indicates whether the time-to-live (TTL) expiration countdown timer should be reset to the table's TTL. Supported values:TRUE: Reset the expiration countdown timer to the table's configured TTL.FALSE: Don't reset the timer; expiration countdown will continue from where it is, as if the table had not been accessed.
TRUE.ADD_COLUMN_EXPRESSION: When adding a column, an optional expression to use for the new column's values. Any valid expression may be used, including one containing references to existing columns in the same table.STRATEGY_DEFINITION: Optional parameter for specifying the tier strategy for the table and its columns whenactionisSET_STRATEGY_DEFINITION, replacing the existing tier strategy in its entirety.INDEX_TYPE: Type of index to create, whenactionisCREATE_INDEX; to refresh, whenactionisREFRESH_INDEX; or to delete, whenactionisDELETE_INDEX. Supported values:COLUMN: Create or delete a column (attribute) index.LOW_CARDINALITY: Create a low-cardinality column (attribute) index.CHUNK_SKIP: Create or delete a chunk skip index.GEOSPATIAL: Create or delete a geospatial indexCAGRA: Create or delete a CAGRA index on a vector columnHNSW: Create or delete an HNSW index on a vector column
COLUMN.INDEX_OPTIONS: Options to use when creating an index, in the format "key: value [, key: value [, ...]]". Valid options vary by index type.
Map.- Returns:
- The current value of
options.
-
setOptions
public AlterTableRequest setOptions(Map<String,String> options)
Optional parameters.ACTIONCOLUMN_NAMETABLE_NAMECOLUMN_DEFAULT_VALUE: When adding a column, set a default value for existing records. For nullable columns, the default value will be null, regardless of data type.COLUMN_PROPERTIES: When adding or changing a column, set the column properties (strings, separated by a comma: data, text_search, char8, int8 etc).COLUMN_TYPE: When adding or changing a column, set the column type (strings, separated by a comma: int, double, string, null etc).COPY_VALUES_FROM_COLUMN: [DEPRECATED--please useADD_COLUMN_EXPRESSIONinstead.]RENAME_COLUMN: When changing a column, specify new column name.VALIDATE_CHANGE_COLUMN: When changing a column, validate the change before applying it (or not). Supported values:TRUE: Validate all values. A value too large (or too long) for the new type will prevent any change.FALSE: When a value is too large or long, it will be truncated.
TRUE.UPDATE_LAST_ACCESS_TIME: Indicates whether the time-to-live (TTL) expiration countdown timer should be reset to the table's TTL. Supported values:TRUE: Reset the expiration countdown timer to the table's configured TTL.FALSE: Don't reset the timer; expiration countdown will continue from where it is, as if the table had not been accessed.
TRUE.ADD_COLUMN_EXPRESSION: When adding a column, an optional expression to use for the new column's values. Any valid expression may be used, including one containing references to existing columns in the same table.STRATEGY_DEFINITION: Optional parameter for specifying the tier strategy for the table and its columns whenactionisSET_STRATEGY_DEFINITION, replacing the existing tier strategy in its entirety.INDEX_TYPE: Type of index to create, whenactionisCREATE_INDEX; to refresh, whenactionisREFRESH_INDEX; or to delete, whenactionisDELETE_INDEX. Supported values:COLUMN: Create or delete a column (attribute) index.LOW_CARDINALITY: Create a low-cardinality column (attribute) index.CHUNK_SKIP: Create or delete a chunk skip index.GEOSPATIAL: Create or delete a geospatial indexCAGRA: Create or delete a CAGRA index on a vector columnHNSW: Create or delete an HNSW index on a vector column
COLUMN.INDEX_OPTIONS: Options to use when creating an index, in the format "key: value [, key: value [, ...]]". Valid options vary by index type.
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-