@InterfaceAudience.Public @InterfaceStability.Unstable public class AlterTableOptions extends Object
Constructor and Description |
---|
AlterTableOptions() |
Modifier and Type | Method and Description |
---|---|
AlterTableOptions |
addColumn(ColumnSchema colSchema)
Add a new column.
|
AlterTableOptions |
addColumn(String name,
Type type,
Object defaultVal)
Add a new column that's not nullable.
|
AlterTableOptions |
addNullableColumn(String name,
Type type)
Add a new column that's nullable and has no default value.
|
AlterTableOptions |
addNullableColumn(String name,
Type type,
Object defaultVal)
Add a new column that's nullable.
|
AlterTableOptions |
addRangePartition(PartialRow lowerBound,
PartialRow upperBound)
Add a range partition to the table with an inclusive lower bound and an exclusive upper bound.
|
AlterTableOptions |
addRangePartition(PartialRow lowerBound,
PartialRow upperBound,
RangePartitionBound lowerBoundType,
RangePartitionBound upperBoundType)
Add a range partition to the table with a lower bound and upper bound.
|
AlterTableOptions |
dropColumn(String name)
Drop a column.
|
AlterTableOptions |
dropRangePartition(PartialRow lowerBound,
PartialRow upperBound)
Drop the range partition from the table with the specified inclusive lower bound and exclusive
upper bound.
|
AlterTableOptions |
dropRangePartition(PartialRow lowerBound,
PartialRow upperBound,
RangePartitionBound lowerBoundType,
RangePartitionBound upperBoundType)
Drop the range partition from the table with the specified lower bound and upper bound.
|
AlterTableOptions |
renameColumn(String oldName,
String newName)
Change the name of a column.
|
AlterTableOptions |
renameTable(String newName)
Change a table's name.
|
public AlterTableOptions renameTable(String newName)
newName
- new table's name, must be used to check progresspublic AlterTableOptions addColumn(ColumnSchema colSchema)
colSchema
- the schema of the new columnpublic AlterTableOptions addColumn(String name, Type type, Object defaultVal)
name
- name of the new columntype
- type of the new columndefaultVal
- default value used for the currently existing rowspublic AlterTableOptions addNullableColumn(String name, Type type)
name
- name of the new columntype
- type of the new columnpublic AlterTableOptions addNullableColumn(String name, Type type, Object defaultVal)
name
- name of the new columntype
- type of the new columndefaultVal
- the default value of the new columnpublic AlterTableOptions dropColumn(String name)
name
- name of the columnpublic AlterTableOptions renameColumn(String oldName, String newName)
oldName
- old column's name, must existnewName
- new name to usepublic AlterTableOptions addRangePartition(PartialRow lowerBound, PartialRow upperBound)
lowerBound
- inclusive lower bound, may be empty but not nullupperBound
- exclusive upper bound, may be empty but not nullpublic AlterTableOptions addRangePartition(PartialRow lowerBound, PartialRow upperBound, RangePartitionBound lowerBoundType, RangePartitionBound upperBoundType)
lowerBound
- lower bound, may be empty but not nullupperBound
- upper bound, may be empty but not nulllowerBoundType
- the type of the lower bound, either inclusive or exclusiveupperBoundType
- the type of the upper bound, either inclusive or exclusivepublic AlterTableOptions dropRangePartition(PartialRow lowerBound, PartialRow upperBound)
lowerBound
- inclusive lower bound, can be empty but not nullupperBound
- exclusive upper bound, can be empty but not nullpublic AlterTableOptions dropRangePartition(PartialRow lowerBound, PartialRow upperBound, RangePartitionBound lowerBoundType, RangePartitionBound upperBoundType)
lowerBound
- inclusive lower bound, can be empty but not nullupperBound
- exclusive upper bound, can be empty but not nulllowerBoundType
- the type of the lower bound, either inclusive or exclusiveupperBoundType
- the type of the upper bound, either inclusive or exclusiveCopyright © 2017 The Apache Software Foundation. All rights reserved.