public class AlterTableColumnsRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.alterTableColumns(AlterTableColumnsRequest)
.
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.
Set or unset compression for a column.
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
List<Map<String,String>> |
getColumnAlterations() |
Map<String,String> |
getOptions() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getTableName() |
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
AlterTableColumnsRequest |
setColumnAlterations(List<Map<String,String>> columnAlterations) |
AlterTableColumnsRequest |
setOptions(Map<String,String> options) |
AlterTableColumnsRequest |
setTableName(String tableName) |
String |
toString() |
public AlterTableColumnsRequest()
public AlterTableColumnsRequest(String tableName, List<Map<String,String>> columnAlterations, Map<String,String> options)
tableName
- Table on which the operation will be performed. Must
be an existing table or view.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.public static org.apache.avro.Schema getClassSchema()
public String getTableName()
public AlterTableColumnsRequest setTableName(String tableName)
tableName
- Table on which the operation will be performed. Must
be an existing table or view.this
to mimic the builder pattern.public List<Map<String,String>> getColumnAlterations()
public AlterTableColumnsRequest setColumnAlterations(List<Map<String,String>> columnAlterations)
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'}
]this
to mimic the builder pattern.public AlterTableColumnsRequest setOptions(Map<String,String> options)
options
- Optional parameters.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2020. All rights reserved.