public class CreateIndexConstantOperation extends IndexConstantOperation implements java.io.Serializable
bp < bo
)cc
(Tc = [bc,cc))Tp
created (Tp = [bp,...)
).Tc
is created (Tc = [bc,...), Tc.parent = Tp
)Tc
is committed (Tc = [bc,cc)
)To = [bo,...)
is created such that cc < bo
To
is committed (To = [bo,co)
)1
, then chain
commit that transaction. In that case, the commit timestamp if 2
, and the new transaction's begin
timestamp is 2
. Thus, there is no possibility of another transaction interleaving with the operation--
the transactions are "contiguous in time".indexName, schemaName, tableName
tableId
Constructor and Description |
---|
CreateIndexConstantOperation() |
CreateIndexConstantOperation(boolean forCreateTable,
boolean unique,
boolean uniqueWithDuplicateNulls,
java.lang.String indexType,
java.lang.String schemaName,
java.lang.String indexName,
java.lang.String tableName,
UUID tableId,
java.lang.String[] columnNames,
boolean[] isAscending,
boolean isConstraint,
UUID conglomerateUUID,
boolean excludeNulls,
boolean excludeDefaults,
boolean preSplit,
boolean sampling,
java.lang.String splitKeyPath,
java.lang.String hfilePath,
java.lang.String columnDelimiter,
java.lang.String characterDelimiter,
java.lang.String timestampFormat,
java.lang.String dateFormat,
java.lang.String timeFormat,
java.util.Properties properties)
Make the ConstantAction to create an index.
|
CreateIndexConstantOperation(ConglomerateDescriptor srcCD,
TableDescriptor td,
java.util.Properties properties)
Make a ConstantAction that creates a new physical conglomerate
based on index information stored in the received descriptors.
|
Modifier and Type | Method and Description |
---|---|
void |
executeConstantAction(Activation activation)
This is the guts of the Execution-time logic for
creating an index.
|
long |
getCreatedConglomNumber()
Get the conglomerate number for the conglomerate that was
created by this constant action.
|
UUID |
getCreatedUUID()
Get the UUID for the conglomerate descriptor that was created
(or re-used) by this constant action.
|
ExecRow |
getIndexTemplateRow() |
long |
getReplacedConglomNumber()
If the purpose of this constant action was to "replace" a
dropped physical conglomerate, then this method returns the
conglomerate number of the dropped conglomerate.
|
java.lang.String |
toString() |
protected boolean |
waitsForConcurrentTransactions()
Declares whether this DDL operation has to wait for the draining of concurrent transactions or not
|
beginChildTransaction, getIndexName, getScopeName, populateIndex, setIndexName
dropConglomerate, dropConglomerate, dropConstraint, dropConstraint, dropConstraint, dropIndex, executeConglomReplacement, getConglomReplacementAction, recreateUniqueConstraintBackingIndexAsUniqueWhenNotNull
addColumnDependencies, adjustUDTDependencies, adjustUDTDependencies, constructToString, getAndCheckSchemaDescriptor, getBlockedTables, getSchemaDescriptorForCreate, noGrantCheck, noRevokeCheck, storeConstraintDependenciesOnPrivileges, storeViewTriggerDependenciesOnPrivileges, waitForConcurrentTransactions
public CreateIndexConstantOperation()
public CreateIndexConstantOperation(boolean forCreateTable, boolean unique, boolean uniqueWithDuplicateNulls, java.lang.String indexType, java.lang.String schemaName, java.lang.String indexName, java.lang.String tableName, UUID tableId, java.lang.String[] columnNames, boolean[] isAscending, boolean isConstraint, UUID conglomerateUUID, boolean excludeNulls, boolean excludeDefaults, boolean preSplit, boolean sampling, java.lang.String splitKeyPath, java.lang.String hfilePath, java.lang.String columnDelimiter, java.lang.String characterDelimiter, java.lang.String timestampFormat, java.lang.String dateFormat, java.lang.String timeFormat, java.util.Properties properties)
forCreateTable
- Being executed within a CREATE TABLE
statementunique
- True means it will be a unique indexuniqueWithDuplicateNulls
- True means index check and disallow
any duplicate key if key has no
column with a null value. If any
column in the key has a null value,
no checking is done and insert will
always succeed.indexType
- type of index (BTREE, for example)schemaName
- schema that table (and index)
lives in.indexName
- Name of the indextableName
- Name of table the index will be ontableId
- UUID of tablecolumnNames
- Names of the columns in the index,
in orderisAscending
- Array of booleans telling asc/desc
on each columnisConstraint
- TRUE if index is backing up a
constraint, else FALSEconglomerateUUID
- ID of conglomerateproperties
- The optional properties list
associated with the index.CreateIndexConstantOperation(ConglomerateDescriptor srcCD, TableDescriptor td, java.util.Properties properties)
public java.lang.String toString()
toString
in class java.lang.Object
public void executeConstantAction(Activation activation) throws StandardException
A index is represented as:
executeConstantAction
in interface ConstantAction
activation
- The execution environment for this constant action.StandardException
- Thrown on failureConglomerateDescriptor
,
SchemaDescriptor
,
ConstantAction.executeConstantAction(com.splicemachine.db.iapi.sql.Activation)
public ExecRow getIndexTemplateRow()
public long getCreatedConglomNumber()
public long getReplacedConglomNumber()
public UUID getCreatedUUID()
protected boolean waitsForConcurrentTransactions()
DDLConstantOperation
waitsForConcurrentTransactions
in class DDLConstantOperation