public class AlterTableDesc extends DDLDesc implements Serializable, DDLDesc.DDLDescWithWriteId
Modifier and Type | Class and Description |
---|---|
static class |
AlterTableDesc.AlterTableTypes
alterTableTypes.
|
static class |
AlterTableDesc.ProtectModeType |
DDLDesc.DDLDescWithWriteId
Modifier and Type | Field and Description |
---|---|
static Set<AlterTableDesc.AlterTableTypes> |
alterTableTypesWithPartialSpec |
Constructor and Description |
---|
AlterTableDesc() |
AlterTableDesc(AlterTableDesc.AlterTableTypes alterType) |
AlterTableDesc(AlterTableDesc.AlterTableTypes alterType,
HashMap<String,String> partSpec,
boolean expectView) |
AlterTableDesc(AlterTableDesc.AlterTableTypes alterType,
ReplicationSpec replicationSpec) |
AlterTableDesc(String tableName,
boolean sortingOff,
HashMap<String,String> partSpec) |
AlterTableDesc(String tableName,
boolean turnOffSkewed,
List<String> skewedColNames,
List<List<String>> skewedColValues) |
AlterTableDesc(String tableName,
HashMap<String,String> partSpec,
int numBuckets) |
AlterTableDesc(String name,
HashMap<String,String> partSpec,
List<FieldSchema> newCols,
AlterTableDesc.AlterTableTypes alterType,
boolean isCascade) |
AlterTableDesc(String tblName,
HashMap<String,String> partSpec,
String oldColName,
String newColName,
String newType,
String newComment,
boolean first,
String afterCol,
boolean isCascade) |
AlterTableDesc(String tblName,
HashMap<String,String> partSpec,
String oldColName,
String newColName,
String newType,
String newComment,
boolean first,
String afterCol,
boolean isCascade,
List<SQLPrimaryKey> primaryKeyCols,
List<SQLForeignKey> foreignKeyCols,
List<SQLUniqueConstraint> uniqueConstraintCols,
List<SQLNotNullConstraint> notNullConstraintCols,
List<SQLDefaultConstraint> defaultConstraints,
List<SQLCheckConstraint> checkConstraints) |
AlterTableDesc(String tableName,
int numBuckets,
List<String> bucketCols,
List<Order> sortCols,
HashMap<String,String> partSpec) |
AlterTableDesc(String tableName,
List<SQLPrimaryKey> primaryKeyCols,
List<SQLForeignKey> foreignKeyCols,
List<SQLUniqueConstraint> uniqueConstraintCols,
List<SQLNotNullConstraint> notNullConstraintCols,
List<SQLDefaultConstraint> defaultConstraints,
List<SQLCheckConstraint> checkConstraints,
ReplicationSpec replicationSpec) |
AlterTableDesc(String tableName,
List<SQLPrimaryKey> primaryKeyCols,
List<SQLForeignKey> foreignKeyCols,
List<SQLUniqueConstraint> uniqueConstraintCols,
ReplicationSpec replicationSpec) |
AlterTableDesc(String tableName,
Map<List<String>,String> locations,
HashMap<String,String> partSpec) |
AlterTableDesc(String tableName,
PrincipalDesc ownerPrincipal) |
AlterTableDesc(String oldName,
String newName,
boolean expectView,
ReplicationSpec replicationSpec) |
AlterTableDesc(String tableName,
String newLocation,
HashMap<String,String> partSpec) |
AlterTableDesc(String tableName,
String dropConstraintName,
ReplicationSpec replicationSpec) |
AlterTableDesc(String name,
String inputFormat,
String outputFormat,
String serdeName,
String storageHandler,
HashMap<String,String> partSpec) |
public static final Set<AlterTableDesc.AlterTableTypes> alterTableTypesWithPartialSpec
public AlterTableDesc()
public AlterTableDesc(String tblName, HashMap<String,String> partSpec, String oldColName, String newColName, String newType, String newComment, boolean first, String afterCol, boolean isCascade) throws SemanticException
tblName
- table nameoldColName
- old column namenewColName
- new column namenewComment
- newType
- SemanticException
public AlterTableDesc(String tblName, HashMap<String,String> partSpec, String oldColName, String newColName, String newType, String newComment, boolean first, String afterCol, boolean isCascade, List<SQLPrimaryKey> primaryKeyCols, List<SQLForeignKey> foreignKeyCols, List<SQLUniqueConstraint> uniqueConstraintCols, List<SQLNotNullConstraint> notNullConstraintCols, List<SQLDefaultConstraint> defaultConstraints, List<SQLCheckConstraint> checkConstraints) throws SemanticException
SemanticException
public AlterTableDesc(String oldName, String newName, boolean expectView, ReplicationSpec replicationSpec) throws SemanticException
oldName
- old name of the tablenewName
- new name of the tableexpectView
- Flag to denote if current table can be a viewreplicationSpec
- Replication specification with current event IDSemanticException
public AlterTableDesc(String name, HashMap<String,String> partSpec, List<FieldSchema> newCols, AlterTableDesc.AlterTableTypes alterType, boolean isCascade) throws SemanticException
name
- name of the tablenewCols
- new columns to be addedSemanticException
public AlterTableDesc(AlterTableDesc.AlterTableTypes alterType, ReplicationSpec replicationSpec)
alterType
- type of alter opreplicationSpec
- Replication specification with current event IDpublic AlterTableDesc(AlterTableDesc.AlterTableTypes alterType)
alterType
- type of alter oppublic AlterTableDesc(AlterTableDesc.AlterTableTypes alterType, HashMap<String,String> partSpec, boolean expectView)
alterType
- type of alter opexpectView
- Flag to denote if current table can be a viewpartSpec
- Partition specifier with map of key and values.public AlterTableDesc(String name, String inputFormat, String outputFormat, String serdeName, String storageHandler, HashMap<String,String> partSpec) throws SemanticException
name
- name of the tableinputFormat
- new table input formatoutputFormat
- new table output formatpartSpec
- SemanticException
public AlterTableDesc(String tableName, int numBuckets, List<String> bucketCols, List<Order> sortCols, HashMap<String,String> partSpec) throws SemanticException
SemanticException
public AlterTableDesc(String tableName, boolean sortingOff, HashMap<String,String> partSpec) throws SemanticException
SemanticException
public AlterTableDesc(String tableName, String newLocation, HashMap<String,String> partSpec) throws SemanticException
SemanticException
public AlterTableDesc(String tableName, Map<List<String>,String> locations, HashMap<String,String> partSpec) throws SemanticException
SemanticException
public AlterTableDesc(String tableName, boolean turnOffSkewed, List<String> skewedColNames, List<List<String>> skewedColValues) throws SemanticException
SemanticException
public AlterTableDesc(String tableName, HashMap<String,String> partSpec, int numBuckets) throws SemanticException
SemanticException
public AlterTableDesc(String tableName, String dropConstraintName, ReplicationSpec replicationSpec) throws SemanticException
SemanticException
public AlterTableDesc(String tableName, List<SQLPrimaryKey> primaryKeyCols, List<SQLForeignKey> foreignKeyCols, List<SQLUniqueConstraint> uniqueConstraintCols, ReplicationSpec replicationSpec) throws SemanticException
SemanticException
public AlterTableDesc(String tableName, List<SQLPrimaryKey> primaryKeyCols, List<SQLForeignKey> foreignKeyCols, List<SQLUniqueConstraint> uniqueConstraintCols, List<SQLNotNullConstraint> notNullConstraintCols, List<SQLDefaultConstraint> defaultConstraints, List<SQLCheckConstraint> checkConstraints, ReplicationSpec replicationSpec) throws SemanticException
SemanticException
public AlterTableDesc(String tableName, PrincipalDesc ownerPrincipal)
public void setOwnerPrincipal(PrincipalDesc ownerPrincipal)
ownerPrincipal
- the owner principal of the tablepublic PrincipalDesc getOwnerPrincipal()
public String getAlterTableTypeString()
public String getOldName()
public void setOldName(String oldName) throws SemanticException
oldName
- the oldName to setSemanticException
public String getNewName()
public void setNewName(String newName)
newName
- the newName to setpublic AlterTableDesc.AlterTableTypes getOp()
public void setOp(AlterTableDesc.AlterTableTypes op)
op
- the op to setpublic ArrayList<FieldSchema> getNewCols()
public void setNewCols(ArrayList<FieldSchema> newCols)
newCols
- the newCols to setpublic String getSerdeName()
public void setSerdeName(String serdeName)
serdeName
- the serdeName to setpublic String getInputFormat()
public void setInputFormat(String inputFormat)
inputFormat
- the input format to setpublic String getOutputFormat()
public void setOutputFormat(String outputFormat)
outputFormat
- the output format to setpublic String getStorageHandler()
public void setPrimaryKeyCols(List<SQLPrimaryKey> primaryKeyCols)
primaryKeyCols
- the primary key cols to setpublic List<SQLPrimaryKey> getPrimaryKeyCols()
public void setForeignKeyCols(List<SQLForeignKey> foreignKeyCols)
foreignKeyCols
- the foreign key cols to setpublic List<SQLForeignKey> getForeignKeyCols()
public List<SQLUniqueConstraint> getUniqueConstraintCols()
public List<SQLNotNullConstraint> getNotNullConstraintCols()
public List<SQLDefaultConstraint> getDefaultConstraintCols()
public List<SQLCheckConstraint> getCheckConstraintCols()
public String getConstraintName()
public void setDropConstraintName(String constraintName)
constraintName
- the dropConstraintName to setpublic void setStorageHandler(String storageHandler)
storageHandler
- the storage handler to setpublic int getNumberBuckets()
public void setNumberBuckets(int numberBuckets)
numberBuckets
- the number of buckets to setpublic void setBucketColumns(ArrayList<String> bucketColumns)
bucketColumns
- the bucket columns to setpublic void setSortColumns(ArrayList<Order> sortColumns)
sortColumns
- the sort columns to setpublic String getOldColName()
public void setOldColName(String oldColName)
oldColName
- the old column namepublic String getNewColName()
public void setNewColName(String newColName)
newColName
- the new column namepublic String getNewColType()
public void setNewColType(String newType)
newType
- new column's typepublic String getNewColComment()
public void setNewColComment(String newComment)
newComment
- new column's commentpublic boolean getFirst()
public void setFirst(boolean first)
first
- set the column to position 0public String getAfterCol()
public void setAfterCol(String afterCol)
afterCol
- set the column's after positionpublic boolean getExpectView()
public void setExpectView(boolean expectView)
expectView
- set whether to expect a view being alteredpublic String getNewLocation()
public void setNewLocation(String newLocation)
newLocation
- new locationpublic boolean isProtectModeEnable()
public void setProtectModeEnable(boolean protectModeEnable)
public AlterTableDesc.ProtectModeType getProtectModeType()
public void setProtectModeType(AlterTableDesc.ProtectModeType protectModeType)
public Map<List<String>,String> getSkewedLocations()
public void setSkewedLocations(Map<List<String>,String> skewedLocations)
skewedLocations
- the skewedLocations to setpublic boolean isTurnOffSorting()
public boolean isTurnOffSkewed()
public void setTurnOffSkewed(boolean turnOffSkewed)
turnOffSkewed
- the turnOffSkewed to setpublic void setSkewedColNames(List<String> skewedColNames)
skewedColNames
- the skewedColNames to setpublic void setSkewedColValues(List<List<String>> skewedColValues)
skewedColValues
- the skewedColValues to setpublic void validate() throws SemanticException
SemanticException
public void setTable(Table table)
table
- the table to setpublic boolean isStoredAsSubDirectories()
public void setStoredAsSubDirectories(boolean isStoredAsSubDirectories)
isStoredAsSubDirectories
- the isStoredAsSubDirectories to setpublic void setDropIfExists(boolean isDropIfExists)
isDropIfExists
- the isDropIfExists to setpublic boolean getIsDropIfExists()
public boolean getIsCascade()
public void setIsCascade(boolean isCascade)
cascade
- the isCascade to setpublic static boolean doesAlterTableTypeSupportPartialPartitionSpec(AlterTableDesc.AlterTableTypes type)
public EnvironmentContext getEnvironmentContext()
public void setEnvironmentContext(EnvironmentContext environmentContext)
public ReplicationSpec getReplicationSpec()
public void setWriteId(long writeId)
setWriteId
in interface DDLDesc.DDLDescWithWriteId
public String getFullTableName()
getFullTableName
in interface DDLDesc.DDLDescWithWriteId
public boolean mayNeedWriteId()
mayNeedWriteId
in interface DDLDesc.DDLDescWithWriteId
public Long getWriteId()
Copyright © 2022 The Apache Software Foundation. All rights reserved.