public class AlterTableDesc extends DDLDesc implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
AlterTableDesc.AlterTableTypes
alterTableTypes.
|
static class |
AlterTableDesc.ProtectModeType |
Modifier and Type | Field and Description |
---|---|
static Set<AlterTableDesc.AlterTableTypes> |
alterTableTypesWithPartialSpec |
Constructor and Description |
---|
AlterTableDesc() |
AlterTableDesc(AlterTableDesc.AlterTableTypes alterType) |
AlterTableDesc(AlterTableDesc.AlterTableTypes alterType,
boolean expectView) |
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 tableName,
int numBuckets,
List<String> bucketCols,
List<Order> sortCols,
HashMap<String,String> partSpec) |
AlterTableDesc(String tableName,
Map<List<String>,String> locations,
HashMap<String,String> partSpec) |
AlterTableDesc(String oldName,
String newName,
boolean expectView) |
AlterTableDesc(String tableName,
String newLocation,
HashMap<String,String> partSpec) |
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)
tblName
- table nameoldColName
- old column namenewColName
- new column namenewComment
- newType
- public AlterTableDesc(String oldName, String newName, boolean expectView)
oldName
- old name of the tablenewName
- new name of the tablepublic AlterTableDesc(String name, HashMap<String,String> partSpec, List<FieldSchema> newCols, AlterTableDesc.AlterTableTypes alterType, boolean isCascade)
name
- name of the tablenewCols
- new columns to be addedpublic AlterTableDesc(AlterTableDesc.AlterTableTypes alterType)
alterType
- type of alter oppublic AlterTableDesc(AlterTableDesc.AlterTableTypes alterType, boolean expectView)
alterType
- type of alter oppublic AlterTableDesc(String name, String inputFormat, String outputFormat, String serdeName, String storageHandler, HashMap<String,String> partSpec)
name
- name of the tableinputFormat
- new table input formatoutputFormat
- new table output formatpartSpec
- public AlterTableDesc(String tableName, int numBuckets, List<String> bucketCols, List<Order> sortCols, HashMap<String,String> partSpec)
public AlterTableDesc(String tableName, boolean sortingOff, HashMap<String,String> partSpec)
public AlterTableDesc(String tableName, String newLocation, HashMap<String,String> partSpec)
public AlterTableDesc(String tableName, Map<List<String>,String> locations, HashMap<String,String> partSpec)
public AlterTableDesc(String tableName, boolean turnOffSkewed, List<String> skewedColNames, List<List<String>> skewedColValues)
public String getAlterTableTypeString()
public String getOldName()
public void setOldName(String oldName)
oldName
- the oldName to setpublic 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 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 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 Table getTable()
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 static boolean doesAlterTableTypeSupportPartialPartitionSpec(AlterTableDesc.AlterTableTypes type)
Copyright © 2017 The Apache Software Foundation. All rights reserved.