public class AlterTableConstantOperation extends IndexConstantOperation
Modifier and Type | Field and Description |
---|---|
protected int |
behavior |
protected ColumnInfo[] |
columnInfo |
protected IndexRowGenerator[] |
compressIRGs |
protected ConstantAction[] |
constraintActions |
protected java.lang.String |
indexNameForStatistics |
protected UUID |
schemaId |
protected SchemaDescriptor |
sd |
protected java.lang.String |
tableName |
indexName, schemaName
tableId
Constructor and Description |
---|
AlterTableConstantOperation(SchemaDescriptor sd,
java.lang.String tableName,
UUID tableId,
ColumnInfo[] columnInfo,
ConstantAction[] constraintActions,
int behavior,
java.lang.String indexNameForStatistics)
Make the AlterAction for an ALTER TABLE statement.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doIndexUpdate(DataDictionary dd,
TableDescriptor td,
TransactionController tc,
int index,
long[] newIndexCongloms,
ConglomerateDescriptor cd,
java.util.Properties properties,
boolean statisticsExist,
DataValueDescriptor[] rowArray,
ColumnOrdering[] columnOrder,
int[] collationIds) |
void |
executeConstantAction(Activation activation)
Run this constant action.
|
protected void |
executeConstantActionBody(Activation activation) |
protected void |
executeConstraintActions(Activation activation) |
protected static void |
executeUpdate(LanguageConnectionContext lcc,
java.lang.String updateStmt) |
protected int |
getAffectedIndexes(TableDescriptor td)
Get info on the indexes on the table being compressed.
|
protected Txn |
getChainedTransaction(TransactionController tc,
Txn txnToWaitFor,
long tableConglomId,
java.lang.String alterTableActionName) |
java.lang.String |
getScopeName() |
protected TableDescriptor |
getTableDescriptor(LanguageConnectionContext lcc) |
protected void |
prepareDataDictionary(Activation activation)
Do top-level DDL data dictionary prep for ALTER_TABLE.
|
java.lang.String |
toString() |
protected void |
transformAndWriteToNewConglomerate(Activation activation,
TxnView parentTxn,
com.splicemachine.ddl.DDLMessage.DDLChange ddlChange,
long baseConglomNumber,
long destConglom,
long demarcationPoint) |
protected void |
updateAllIndexes(Activation activation,
long newHeapConglom,
TableDescriptor td,
TransactionController tc) |
protected void |
updateIndex(long newBaseConglom,
Activation activation,
TransactionController tc,
TableDescriptor td,
int index,
long[] newIndexCongloms) |
protected ConglomerateDescriptor |
updateTableConglomerateDescriptor(TableDescriptor tableDescriptor,
long newConglomNum,
SchemaDescriptor sd,
LanguageConnectionContext lcc,
ConstraintConstantOperation constraintAction)
Do what's necessary to update a table descriptor that's been modified due to alter table
actions.
|
beginChildTransaction, getIndexName, populateIndex, setIndexName
dropConglomerate, dropConglomerate, dropConstraint, dropConstraint, dropConstraint, dropIndex, executeConglomReplacement, getConglomReplacementAction, recreateUniqueConstraintBackingIndexAsUniqueWhenNotNull
addColumnDependencies, adjustUDTDependencies, adjustUDTDependencies, constructToString, getAndCheckSchemaDescriptor, getBlockedTables, getSchemaDescriptorForCreate, noGrantCheck, noRevokeCheck, storeConstraintDependenciesOnPrivileges, storeViewTriggerDependenciesOnPrivileges, waitForConcurrentTransactions, waitsForConcurrentTransactions
protected SchemaDescriptor sd
protected java.lang.String tableName
protected UUID schemaId
protected ColumnInfo[] columnInfo
protected ConstantAction[] constraintActions
protected int behavior
protected java.lang.String indexNameForStatistics
protected IndexRowGenerator[] compressIRGs
public AlterTableConstantOperation(SchemaDescriptor sd, java.lang.String tableName, UUID tableId, ColumnInfo[] columnInfo, ConstantAction[] constraintActions, int behavior, java.lang.String indexNameForStatistics)
sd
- descriptor for the table's schema.tableName
- Name of table.tableId
- UUID of tablecolumnInfo
- Information on all the columns in the table.constraintActions
- ConstraintConstantAction[] for constraintsbehavior
- drop behavior for dropping columnindexNameForStatistics
- Will name the index whose statisticspublic java.lang.String toString()
toString
in class java.lang.Object
public void executeConstantAction(Activation activation) throws StandardException
activation
- the activation in which to run the actionStandardException
- if an error happens during execution
of the actionprotected void executeConstantActionBody(Activation activation) throws StandardException
StandardException
protected void prepareDataDictionary(Activation activation) throws StandardException
activation
- the activation execution the alter table.StandardException
protected void executeConstraintActions(Activation activation) throws StandardException
StandardException
protected void updateAllIndexes(Activation activation, long newHeapConglom, TableDescriptor td, TransactionController tc) throws StandardException
StandardException
protected void updateIndex(long newBaseConglom, Activation activation, TransactionController tc, TableDescriptor td, int index, long[] newIndexCongloms) throws StandardException
StandardException
protected void doIndexUpdate(DataDictionary dd, TableDescriptor td, TransactionController tc, int index, long[] newIndexCongloms, ConglomerateDescriptor cd, java.util.Properties properties, boolean statisticsExist, DataValueDescriptor[] rowArray, ColumnOrdering[] columnOrder, int[] collationIds) throws StandardException
StandardException
protected int getAffectedIndexes(TableDescriptor td) throws StandardException
StandardException
- Thrown on errorprotected TableDescriptor getTableDescriptor(LanguageConnectionContext lcc) throws StandardException
StandardException
protected static void executeUpdate(LanguageConnectionContext lcc, java.lang.String updateStmt) throws StandardException
StandardException
protected ConglomerateDescriptor updateTableConglomerateDescriptor(TableDescriptor tableDescriptor, long newConglomNum, SchemaDescriptor sd, LanguageConnectionContext lcc, ConstraintConstantOperation constraintAction) throws StandardException
tableDescriptor
- the table descriptor that's being effected.newConglomNum
- the conglomerate number of the conglomerate that's been created to
replace the old.sd
- descriptor for the schema in which the new conglomerate lives.lcc
- language connection context required for coordination.constraintAction
- constraint being created, dropped, etcStandardException
protected Txn getChainedTransaction(TransactionController tc, Txn txnToWaitFor, long tableConglomId, java.lang.String alterTableActionName) throws StandardException
StandardException
protected void transformAndWriteToNewConglomerate(Activation activation, TxnView parentTxn, com.splicemachine.ddl.DDLMessage.DDLChange ddlChange, long baseConglomNumber, long destConglom, long demarcationPoint) throws java.io.IOException, StandardException
java.io.IOException
StandardException
public java.lang.String getScopeName()
getScopeName
in interface ScopeNamed
getScopeName
in class IndexConstantOperation