org.apache.hadoop.hive.ql.plan
Class AlterTableDesc
java.lang.Object
org.apache.hadoop.hive.ql.plan.DDLDesc
org.apache.hadoop.hive.ql.plan.AlterTableDesc
- All Implemented Interfaces:
- Serializable
public class AlterTableDesc
- extends DDLDesc
- implements Serializable
AlterTableDesc.
- See Also:
- Serialized Form
Constructor Summary |
AlterTableDesc()
|
AlterTableDesc(AlterTableDesc.AlterTableTypes alterType)
|
AlterTableDesc(AlterTableDesc.AlterTableTypes alterType,
boolean expectView)
|
AlterTableDesc(String tableName,
boolean turnOffSkewed,
List<String> skewedColNames,
List<List<String>> skewedColValues)
|
AlterTableDesc(String tableName,
int numBuckets,
List<String> bucketCols,
List<Order> sortCols)
|
AlterTableDesc(String name,
List<FieldSchema> newCols,
AlterTableDesc.AlterTableTypes alterType)
|
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 tblName,
String oldColName,
String newColName,
String newType,
String newComment,
boolean first,
String afterCol)
|
AlterTableDesc(String name,
String inputFormat,
String outputFormat,
String serdeName,
String storageHandler,
HashMap<String,String> partSpec)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AlterTableDesc
public AlterTableDesc()
AlterTableDesc
public AlterTableDesc(String tblName,
String oldColName,
String newColName,
String newType,
String newComment,
boolean first,
String afterCol)
- Parameters:
tblName
- table nameoldColName
- old column namenewColName
- new column namenewComment
- newType
-
AlterTableDesc
public AlterTableDesc(String oldName,
String newName,
boolean expectView)
- Parameters:
oldName
- old name of the tablenewName
- new name of the table
AlterTableDesc
public AlterTableDesc(String name,
List<FieldSchema> newCols,
AlterTableDesc.AlterTableTypes alterType)
- Parameters:
name
- name of the tablenewCols
- new columns to be added
AlterTableDesc
public AlterTableDesc(AlterTableDesc.AlterTableTypes alterType)
- Parameters:
alterType
- type of alter op
AlterTableDesc
public AlterTableDesc(AlterTableDesc.AlterTableTypes alterType,
boolean expectView)
- Parameters:
alterType
- type of alter op
AlterTableDesc
public AlterTableDesc(String name,
String inputFormat,
String outputFormat,
String serdeName,
String storageHandler,
HashMap<String,String> partSpec)
- Parameters:
name
- name of the tableinputFormat
- new table input formatoutputFormat
- new table output formatpartSpec
-
AlterTableDesc
public AlterTableDesc(String tableName,
int numBuckets,
List<String> bucketCols,
List<Order> sortCols)
AlterTableDesc
public AlterTableDesc(String tableName,
String newLocation,
HashMap<String,String> partSpec)
AlterTableDesc
public AlterTableDesc(String tableName,
Map<List<String>,String> locations,
HashMap<String,String> partSpec)
AlterTableDesc
public AlterTableDesc(String tableName,
boolean turnOffSkewed,
List<String> skewedColNames,
List<List<String>> skewedColValues)
getNewColsString
public List<String> getNewColsString()
getAlterTableTypeString
public String getAlterTableTypeString()
getOldName
public String getOldName()
- Returns:
- the old name of the table
setOldName
public void setOldName(String oldName)
- Parameters:
oldName
- the oldName to set
getNewName
public String getNewName()
- Returns:
- the newName
setNewName
public void setNewName(String newName)
- Parameters:
newName
- the newName to set
getOp
public AlterTableDesc.AlterTableTypes getOp()
- Returns:
- the op
setOp
public void setOp(AlterTableDesc.AlterTableTypes op)
- Parameters:
op
- the op to set
getNewCols
public ArrayList<FieldSchema> getNewCols()
- Returns:
- the newCols
setNewCols
public void setNewCols(ArrayList<FieldSchema> newCols)
- Parameters:
newCols
- the newCols to set
getSerdeName
public String getSerdeName()
- Returns:
- the serdeName
setSerdeName
public void setSerdeName(String serdeName)
- Parameters:
serdeName
- the serdeName to set
getProps
public HashMap<String,String> getProps()
- Returns:
- the props
setProps
public void setProps(HashMap<String,String> props)
- Parameters:
props
- the props to set
getInputFormat
public String getInputFormat()
- Returns:
- the input format
setInputFormat
public void setInputFormat(String inputFormat)
- Parameters:
inputFormat
- the input format to set
getOutputFormat
public String getOutputFormat()
- Returns:
- the output format
setOutputFormat
public void setOutputFormat(String outputFormat)
- Parameters:
outputFormat
- the output format to set
getStorageHandler
public String getStorageHandler()
- Returns:
- the storage handler
setStorageHandler
public void setStorageHandler(String storageHandler)
- Parameters:
storageHandler
- the storage handler to set
getNumberBuckets
public int getNumberBuckets()
- Returns:
- the number of buckets
setNumberBuckets
public void setNumberBuckets(int numberBuckets)
- Parameters:
numberBuckets
- the number of buckets to set
getBucketColumns
public ArrayList<String> getBucketColumns()
- Returns:
- the bucket columns
setBucketColumns
public void setBucketColumns(ArrayList<String> bucketColumns)
- Parameters:
bucketColumns
- the bucket columns to set
getSortColumns
public ArrayList<Order> getSortColumns()
- Returns:
- the sort columns
setSortColumns
public void setSortColumns(ArrayList<Order> sortColumns)
- Parameters:
sortColumns
- the sort columns to set
getOldColName
public String getOldColName()
- Returns:
- old column name
setOldColName
public void setOldColName(String oldColName)
- Parameters:
oldColName
- the old column name
getNewColName
public String getNewColName()
- Returns:
- new column name
setNewColName
public void setNewColName(String newColName)
- Parameters:
newColName
- the new column name
getNewColType
public String getNewColType()
- Returns:
- new column type
setNewColType
public void setNewColType(String newType)
- Parameters:
newType
- new column's type
getNewColComment
public String getNewColComment()
- Returns:
- new column's comment
setNewColComment
public void setNewColComment(String newComment)
- Parameters:
newComment
- new column's comment
getFirst
public boolean getFirst()
- Returns:
- if the column should be changed to position 0
setFirst
public void setFirst(boolean first)
- Parameters:
first
- set the column to position 0
getAfterCol
public String getAfterCol()
- Returns:
- the column's after position
setAfterCol
public void setAfterCol(String afterCol)
- Parameters:
afterCol
- set the column's after position
getExpectView
public boolean getExpectView()
- Returns:
- whether to expect a view being altered
setExpectView
public void setExpectView(boolean expectView)
- Parameters:
expectView
- set whether to expect a view being altered
getPartSpec
public HashMap<String,String> getPartSpec()
- Returns:
- part specification
setPartSpec
public void setPartSpec(HashMap<String,String> partSpec)
- Parameters:
partSpec
-
getNewLocation
public String getNewLocation()
- Returns:
- new location
setNewLocation
public void setNewLocation(String newLocation)
- Parameters:
newLocation
- new location
isProtectModeEnable
public boolean isProtectModeEnable()
setProtectModeEnable
public void setProtectModeEnable(boolean protectModeEnable)
getProtectModeType
public AlterTableDesc.ProtectModeType getProtectModeType()
setProtectModeType
public void setProtectModeType(AlterTableDesc.ProtectModeType protectModeType)
getSkewedLocations
public Map<List<String>,String> getSkewedLocations()
- Returns:
- the skewedLocations
setSkewedLocations
public void setSkewedLocations(Map<List<String>,String> skewedLocations)
- Parameters:
skewedLocations
- the skewedLocations to set
isTurnOffSkewed
public boolean isTurnOffSkewed()
- Returns:
- the turnOffSkewed
setTurnOffSkewed
public void setTurnOffSkewed(boolean turnOffSkewed)
- Parameters:
turnOffSkewed
- the turnOffSkewed to set
getSkewedColNames
public List<String> getSkewedColNames()
- Returns:
- the skewedColNames
setSkewedColNames
public void setSkewedColNames(List<String> skewedColNames)
- Parameters:
skewedColNames
- the skewedColNames to set
getSkewedColValues
public List<List<String>> getSkewedColValues()
- Returns:
- the skewedColValues
setSkewedColValues
public void setSkewedColValues(List<List<String>> skewedColValues)
- Parameters:
skewedColValues
- the skewedColValues to set
validate
public void validate()
throws SemanticException
- Validate alter table description.
- Throws:
SemanticException
getTable
public Table getTable()
- Returns:
- the table
setTable
public void setTable(Table table)
- Parameters:
table
- the table to set
isStoredAsSubDirectories
public boolean isStoredAsSubDirectories()
- Returns:
- the isStoredAsSubDirectories
setStoredAsSubDirectories
public void setStoredAsSubDirectories(boolean isStoredAsSubDirectories)
- Parameters:
isStoredAsSubDirectories
- the isStoredAsSubDirectories to set
Copyright © 2013 The Apache Software Foundation