public class TAlterTableOption extends TParseTreeNode
getOptionType() returns the type of various option:
Column
EAlterTableOptionType.AddColumn, check getColumnDefinitionList() for newly added columnsEAlterTableOptionType.AlterColumn, alter column option, getColumnName() returns the column name.
getAlterColumnSubType() for the subtype of alter column option.
EAlterColumnSubType.SetDefault, getDefaultExpr() returns default expressionEAlterColumnSubType.DropDefaultEAlterColumnSubType.DropNotNullEAlterColumnSubType.SetNotNullEAlterColumnSubType.SetStatistics, getStatisticsValue() returns the statistics valueEAlterColumnSubType.SetOptions, getAttributeOptions() returns the set optionsEAlterColumnSubType.ResetOptions, getAttributeOptions() returns the reset optionsEAlterColumnSubType.SetStorage, getStorageName() retuns the storage nameEAlterColumnSubType.SetDataType, returns the data type nameEAlterTableOptionType.ChangeColumn, MySQL,Hive,Impala change column clause, old column name,new column definitionEAlterTableOptionType.DropColumn, check getColumnNameList() for dropped columns. getDropRestrictType() returns drop restrict type if any.EAlterTableOptionType.ModifyColumn, check getColumnDefinitionList() for modified columnsEAlterTableOptionType.RenameColumn, rename old name to new nameEAlterTableOptionType.SetUnUsedColumn, check getColumnNameList() for unused column. Oracle set unused column.EAlterTableOptionType.DropUnUsedColumn, Oracle drop unused columnsEAlterTableOptionType.DropColumnsContinue, Oracle drop columns continueConstraint
EAlterTableOptionType.AddConstraint, check getConstraintList() for newly added table level constraintsEAlterTableOptionType.AddConstraintPK, primary key column list. MySQL, getConstraintName() returns the constraint nameEAlterTableOptionType.AddConstraintUnique, unique key column list. MyQL,getConstraintName() returns the constraint nameEAlterTableOptionType.AddConstraintFK, unique key column list,
[constraint name],
[referenced table name],
[referenced column list],MySQLEAlterTableOptionType.AddConstraintIndex, check index column list,
[constraint name],[index storage type] MySQL add index constraintEAlterTableOptionType.DropConstraint, constraint name list, [drop restrict type], Oracle/DB2/Greenplum drop constraint. EAlterTableOptionType.AlterConstraintFK, DB2 alter foreign key. EAlterTableOptionType.AlterConstraintCheck, check constraint name , DB2 alter check constraint. EAlterTableOptionType.DropConstraintIndex, constriant name, MySQL drop index EAlterTableOptionType.DropConstraintKey, constriant name, MySQL drop index EAlterTableOptionType.DropConstraintPK, Oracle/DB2/MySQL drop primary key. EAlterTableOptionType.DropConstraintFK,[constriant name], DB2/MySQL drop foreign key. EAlterTableOptionType.DropConstraintUnique, In Oracle, get unique column list, In DB2, get constraint name. EAlterTableOptionType.DropConstraintCheck, check constraint name, DB2 drop check constraint. EAlterTableOptionType.ModifyConstraint, check constraint name EAlterTableOptionType.RenameConstraint, rename old name to new name EAlterTableOptionType.ValidateConstraint, constraint name, greenplum/postgresqlEnable/disable
EAlterTableOptionType.enableTrigger, trigger name, greenplum/postgresql. EAlterTableOptionType.enableAlwaysTrigger, trigger name, greenplum/postgresql. EAlterTableOptionType.enableReplicaTrigger, trigger name, greenplum/postgresql. EAlterTableOptionType.disableTrigger, trigger name, greenplum/postgresql. EAlterTableOptionType.enableRule, rule name, greenplum/postgresql. EAlterTableOptionType.enableAlwaysRule, rule name, greenplum/postgresql. EAlterTableOptionType.enableReplicaRule, rule name, greenplum/postgresql. EAlterTableOptionType.disableRule, rule name, greenplum. Others
EAlterTableOptionType.RenameTable, new table name EAlterTableOptionType.inherit, parent table, greenplum/postgresql. EAlterTableOptionType.noInherit, parent table, greenplum/postgresql. EAlterTableOptionType.ofAnyType, type name, greenplum/postgresql. EAlterTableOptionType.ownerTo, owner name, greenplum/postgresql. EAlterTableOptionType.setTablespace, tablespace name, greenplum/postgresql. EAlterTableOptionType.setSchema, schema name, greenplum. EAlterTableOptionType.clusterOn, index name, postgresql. | Constructor and Description |
|---|
TAlterTableOption() |
addAllMyTokensToTokenList, appendString, fastSetString, getColumnNo, getDummyTag, getEndToken, getGsqlparser, getLineNo, getNodeType, getStartToken, init, init, removeAllMyTokensFromTokenList, setDummyTag, setEndToken, setEndToken, setEndToken, setEndToken, setGsqlparser, setIncludingComment, setNodeType, setStartToken, setStartToken, setStartToken, setStartToken, setString, toScript, toStringpublic EAlterColumnSubType getAlterColumnSubType()
public void setIndexOptionList(TPTNodeList<TMySQLIndexOption> indexOptionList)
public TPTNodeList<TMySQLIndexOption> getIndexOptionList()
public void setIndexCols(TPTNodeList<TColumnWithSortOrder> indexCols)
public TPTNodeList<TColumnWithSortOrder> getIndexCols()
public void setDropRestrictType(TSourceToken st)
public EKeyReferenceType getDropRestrictType()
public EAlterTableOptionType getOptionType()
public TTable getReferencedTable()
public TObjectName getPartitionName()
public TExpression getPartitionExpression2()
public TExpression getPartitionExpression1()
public TObjectNameList getConstraintNameList()
EAlterTableOptionType.DropConstraintpublic TObjectName getSchemaName()
EAlterTableOptionType.setSchemapublic void setNewTablespaceName(TObjectName newTablespaceName)
public TObjectName getNewTablespaceName()
EAlterTableOptionType.setTablespacepublic void setNewOwnerName(TObjectName newOwnerName)
public TObjectName getNewOwnerName()
EAlterTableOptionType.ownerTopublic void setAnyTypeName(TObjectName anyTypeName)
public TObjectName getAnyTypeName()
EAlterTableOptionType.ofAnyTypepublic void setParentTable(TObjectName parentTable)
public TObjectName getParentTable()
EAlterTableOptionType.inherit or
EAlterTableOptionType.noInheritpublic void setRuleName(TObjectName ruleName)
public TObjectName getRuleName()
EAlterTableOptionType.enableRule or
EAlterTableOptionType.enableAlwaysRule or EAlterTableOptionType.enableReplicaRule or
EAlterTableOptionType.disableRulepublic void setTriggerName(TObjectName triggerName)
public TObjectName getTriggerName()
EAlterTableOptionType.enableTrigger or
EAlterTableOptionType.enableAlwaysTrigger or EAlterTableOptionType.enableReplicaTrigger or
EAlterTableOptionType.disableTriggerpublic void setIndexName(TObjectName indexName)
public TObjectName getIndexName()
EAlterTableOptionType.clusterOnpublic void setTableConstraint(TConstraint tableConstraint)
public TConstraint getTableConstraint()
EAlterTableOptionType.AddConstraintpublic void setUsingExpr(TExpression usingExpr)
public TExpression getUsingExpr()
EAlterTableOptionType.AlterColumn and subtype is EAlterColumnSubType.SetDataTypepublic void setNewCollation(TObjectName newCollation)
public TObjectName getNewCollation()
EAlterTableOptionType.AlterColumn and subtype is EAlterColumnSubType.SetDataTypepublic void setNewDataType(TTypeName newDataType)
public TTypeName getNewDataType()
EAlterTableOptionType.AlterColumn and subtype is EAlterColumnSubType.SetDataTypepublic void setStorageName(TObjectName storageName)
public TObjectName getStorageName()
EAlterTableOptionType.AlterColumn and subtype is EAlterColumnSubType.SetStoragepublic void setAttributeOptions(TPTNodeList<TAttributeOption> attributeOptions)
public TPTNodeList<TAttributeOption> getAttributeOptions()
EAlterTableOptionType.AlterColumn and subtype is EAlterColumnSubType.SetOptions
or EAlterColumnSubType.ResetOptionspublic void setStatisticsValue(TConstant statisticsValue)
public TConstant getStatisticsValue()
EAlterTableOptionType.AlterColumn and subtype is EAlterColumnSubType.SetStatisticspublic void setDefaultExpr(TExpression defaultExpr)
public TExpression getDefaultExpr()
public void setMySQLIndexTypeToken(TSourceToken mySQLIndexTypeToken)
public TSourceToken getMySQLIndexTypeToken()
EAlterTableOptionType.AddConstraintIndexpublic void setMySQLIndexStorageType(TMySQLIndexStorageType mySQLIndexStorageType)
public TMySQLIndexStorageType getMySQLIndexStorageType()
getIndexOptionList() instead.public void setNewTableName(TObjectName newTableName)
EAlterTableOptionType.RenameTablenewTableName - the new table namepublic TObjectName getNewTableName()
EAlterTableOptionType.RenameTable, new table in rename to clauseEAlterTableOptionType.setPrivileges, Netezza, table name in set privileges to clause EAlterTableOptionType.exchangePartition,Hive, Impala, table name in exchange partition with table clause EAlterTableOptionType.switchPartition, SQL Server, Openedge, table name of switch partition to target_table clause public void setReferencedColumnList(TObjectNameList referencedColumnList)
public void setReferencedObjectName(TObjectName referencedObjectName)
public void setColumnName(TObjectName columnName)
public TConstraintList getConstraintList()
TConstraint in add constraint clause, valid when getOptionType() is EAlterTableOptionType.AddConstraintpublic TObjectNameList getColumnNameList()
TObjectNameList, valid when getOptionType() is:
EAlterTableOptionType.SetUnUsedColumn
EAlterTableOptionType.DropColumn
EAlterTableOptionType.AddConstraintIndex, columns of an index
EAlterTableOptionType.AddConstraintPK, columns of primary key
EAlterTableOptionType.AddConstraintUnique, columns of unique key
EAlterTableOptionType.AddConstraintFK, columns of foreign key
EAlterTableOptionType.DropConstraintUnique, available in Oracle
public TColumnDefinitionList getColumnDefinitionList()
public TObjectName getColumnName()
getOptionType() is:
EAlterTableOptionType.AlterColumn
EAlterTableOptionType.RenameColumn
EAlterTableOptionType.ChangeColumn
EAlterTableOptionType.AddConstraintIndex, index name, optional
public TObjectName getConstraintName()
getOptionType() is:
EAlterTableOptionType.AddConstraintPK, optional
EAlterTableOptionType.AddConstraintUnique, optional
EAlterTableOptionType.AddConstraintFK, optional
EAlterTableOptionType.ModifyConstraint
EAlterTableOptionType.RenameConstraint
EAlterTableOptionType.DropConstraintFK
EAlterTableOptionType.DropConstraintUnique, available in DB2
EAlterTableOptionType.DropConstraintCheck, available in DB2
EAlterTableOptionType.DropConstraintIndex, available in DB2
EAlterTableOptionType.DropConstraintKey, available in DB2
EAlterTableOptionType.AlterConstraintFK, available in DB2
EAlterTableOptionType.AlterConstraintCheck, available in DB2
public TObjectName getNewColumnName()
getOptionType() is EAlterTableOptionType.RenameColumnpublic TObjectName getNewConstraintName()
getOptionType() is EAlterTableOptionType.RenameConstraintpublic TObjectNameList getReferencedColumnList()
public TObjectName getReferencedObjectName()
getReferencedTable() instead.public void init(Object arg1)
TParseTreeNodeinit in class TParseTreeNodearg1 - first argumentpublic void init(Object arg1, Object arg2)
init in class TParseTreeNodepublic TExpression getCommentExpr()
public void setNewConstraintName(TObjectName newConstraintName)
public void setConstraintName(TDummy pName)
public void setConstraintName(TObjectName constraintName)
public TColumnDefinition getNewColumnDef()
TColumnDefinition, valid when getOptionType() is:
public TObjectName getSerdeName()
getOptionType() is:
public void init(Object arg1, Object arg2, Object arg3)
init in class TParseTreeNodepublic void init(Object arg1, Object arg2, Object arg3, Object arg4)
init in class TParseTreeNodepublic TPTNodeList<TPartitionExtensionClause> getPartitionSpecList()
EAlterTableOptionType.unArchive,
EAlterTableOptionType.archive.
EAlterTableOptionType.touch,
EAlterTableOptionType.dropPartitionSpecList,
EAlterTableOptionType.addPartitionSpecList,public TPTNodeList<THiveKeyValueProperty> getTableProperties()
getOptionType() is EAlterTableOptionType.setTableProperties or
EAlterTableOptionType.unsetTableProperties
getOptionType() is EAlterTableOptionType.serdepublic THiveTableFileFormat getFileFormat()
getOptionType() is EAlterTableOptionType.setFileFormatpublic TObjectName getTableLocation()
getOptionType() is:
EAlterTableOptionType.setLocationpublic TPartitionExtensionClause getNewPartitionSpec()
getOptionType() is:
EAlterTableOptionType.renamePartitionpublic TConstant getNumberOfBuckets()
getOptionType() is:
EAlterTableOptionType.tableBucketspublic TExpressionList getSkewedLocations()
getOptionType() is:
EAlterTableOptionType.skewedLocationpublic THiveTableBuckets getTableBuckets()
getOptionType() is:
EAlterTableOptionType.clusteredSortedpublic TColumnDefinition getPartitionColumnDef()
getOptionType() is:
EAlterTableOptionType.clusteredSortedpublic THiveTableSkewed getTableSkewed()
getOptionType() is:
EAlterTableOptionType.tableSkewedpublic TPartitionExtensionClause getExchangePartitionSpec()
getOptionType() is:
EAlterTableOptionType.exchangePartitionpublic void doParse(TCustomSqlStatement psql, ESqlClause plocation)
TParseTreeNodedoParse in class TParseTreeNodepsql - SQL statement this node belongs toplocation - SQL clause this node belongs topublic TExpression getRetenttionTimeInDays()
public void accept(TParseTreeVisitor v)
TParseTreeNodeaccept in interface Visitableaccept in class TParseTreeNodev - visitor is a descendant class of TParseTreeVisitorpublic void acceptChildren(TParseTreeVisitor v)
TParseTreeNodeacceptChildren in interface VisitableacceptChildren in class TParseTreeNodev - visitor is a descendant class of TParseTreeVisitorpublic void setSerdeName(TObjectName serdeName)
public void setDropRestrictType(EKeyReferenceType dropRestrictType)
public void setColumnDefinitionList(TColumnDefinitionList columnDefinitionList)
public void setConstraintList(TConstraintList constraintList)
public void setColumnNameList(TObjectNameList columnNameList)
public void setNewColumnName(TObjectName newColumnName)
public void setSchemaName(TObjectName schemaName)
public void setConstraintNameList(TObjectNameList constraintNameList)
public void setPartitionExpression1(TExpression partitionExpression1)
public void setPartitionExpression2(TExpression partitionExpression2)
public void setNewColumnDef(TColumnDefinition newColumnDef)
public void setPartitionSpecList(TPTNodeList<TPartitionExtensionClause> partitionSpecList)
public void setTableProperties(TPTNodeList<THiveKeyValueProperty> tableProperties)
public void setFileFormat(THiveTableFileFormat fileFormat)
public void setTableLocation(TObjectName tableLocation)
public void setNewPartitionSpec(TPartitionExtensionClause newPartitionSpec)
public void setNumberOfBuckets(TConstant numberOfBuckets)
public void setSkewedLocations(TExpressionList skewedLocations)
public void setTableBuckets(THiveTableBuckets tableBuckets)
public void setPartitionColumnDef(TColumnDefinition partitionColumnDef)
public void setTableSkewed(THiveTableSkewed tableSkewed)
public void setExchangePartitionSpec(TPartitionExtensionClause exchangePartitionSpec)
public void setOptionType(EAlterTableOptionType optionType)
Copyright © 2019. All rights reserved.