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.IndexedRecord
public class AlterTableColumnsRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.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
Constructors Constructor Description AlterTableColumnsRequest()Constructs an AlterTableColumnsRequest object with default parameters.AlterTableColumnsRequest(String tableName, List<Map<String,String>> columnAlterations, Map<String,String> options)Constructs an AlterTableColumnsRequest 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.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.List<Map<String,String>>getColumnAlterations()List of alter table add/delete/change column requests - all for the same table.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.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.AlterTableColumnsRequestsetColumnAlterations(List<Map<String,String>> columnAlterations)List of alter table add/delete/change column requests - all for the same table.AlterTableColumnsRequestsetOptions(Map<String,String> options)Optional parameters.AlterTableColumnsRequestsetTableName(String tableName)Table on which the operation will be performed.StringtoString()
-
-
-
Constructor Detail
-
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 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. Must be an existing table or view, in [schema_name.]table_name format, using standard name resolution rules.- Returns:
- The current value of
tableName.
-
setTableName
public AlterTableColumnsRequest setTableName(String 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.- Parameters:
tableName- The new value fortableName.- Returns:
thisto mimic the builder pattern.
-
getColumnAlterations
public List<Map<String,String>> 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 of
columnAlterations.
-
setColumnAlterations
public AlterTableColumnsRequest setColumnAlterations(List<Map<String,String>> 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'}]- Parameters:
columnAlterations- The new value forcolumnAlterations.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.- Returns:
- The current value of
options.
-
setOptions
public AlterTableColumnsRequest setOptions(Map<String,String> options)
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.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
-
-