Package com.gpudb.protocol
Class AlterTableColumnsRequest
java.lang.Object
com.gpudb.protocol.AlterTableColumnsRequest
All Implemented Interfaces:
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordpublic class AlterTableColumnsRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters for
GPUdb.alterTableColumns.
Apply various modifications to columns in a table, view. The available modifications include the following:
Create or delete an index on a particular column. This can speed up certain operations when using expressions containing equality or relational operators on indexed columns. This only applies to tables.
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.
Constructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanget(int index) This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.List of alter table add/delete/change column requests - all for the same table.Optional parameters.org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Table on which the operation will be performed.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.setColumnAlterations(List<Map<String, String>> columnAlterations) List of alter table add/delete/change column requests - all for the same table.setOptions(Map<String, String> options) Optional parameters.setTableName(String tableName) Table on which the operation will be performed.toString()
Constructor Details
AlterTableColumnsRequest
public AlterTableColumnsRequest()Constructs an AlterTableColumnsRequest object with default parameters.AlterTableColumnsRequest
public AlterTableColumnsRequest(String tableName, List<Map<String, String>> columnAlterations, Map<String, String> options) Constructs an AlterTableColumnsRequest object with the specified parameters.Parameters:tableName- Table on which the operation will be performed. Must be an existing table or view, in [schema_name.]table_name format, using standard name resolution rules.columnAlterations- List of alter table add/delete/change column requests - all for the same table. Each request is a map that includes ‘column_name’, ‘action’ and the options specific for the action. Note that the same options as in alter table requests but in the same map as the column name and the action. For example: [‘column_name’:‘col_1’,‘action’:‘change_column’,‘rename_column’:‘col_2’,‘column_name’:‘col_1’,‘action’:‘add_column’, ‘type’:‘int’,‘default_value’:‘1’].options- Optional parameters.
Method Details
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
Table on which the operation will be performed. Must be an existing table or view, in [schema_name.]table_name format, using standard name resolution rules.Returns:The current value oftableName.setTableName
Table on which the operation will be performed. Must be an existing table or view, in [schema_name.]table_name format, using standard name resolution rules.Parameters:tableName- The new value fortableName.Returns:thisto mimic the builder pattern.getColumnAlterations
List of alter table add/delete/change column requests - all for the same table. Each request is a map that includes ‘column_name’, ‘action’ and the options specific for the action. Note that the same options as in alter table requests but in the same map as the column name and the action. For example: [‘column_name’:‘col_1’,‘action’:‘change_column’,‘rename_column’:‘col_2’,‘column_name’:‘col_1’,‘action’:‘add_column’, ‘type’:‘int’,‘default_value’:‘1’].Returns:The current value ofcolumnAlterations.setColumnAlterations
List of alter table add/delete/change column requests - all for the same table. Each request is a map that includes ‘column_name’, ‘action’ and the options specific for the action. Note that the same options as in alter table requests but in the same map as the column name and the action. For example: [‘column_name’:‘col_1’,‘action’:‘change_column’,‘rename_column’:‘col_2’,‘column_name’:‘col_1’,‘action’:‘add_column’, ‘type’:‘int’,‘default_value’:‘1’].Parameters:columnAlterations- The new value forcolumnAlterations.Returns:thisto mimic the builder pattern.setOptions
Optional parameters.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.GenericContainerReturns:The schema object describing this class.get
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to getReturns:value of the field with the given index.Throws:put
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:putin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to setvalue- the value to setThrows: