Package org.teiid.query.processor
Class DdlPlan
- java.lang.Object
-
- org.teiid.query.processor.ProcessorPlan
-
- org.teiid.query.processor.DdlPlan
-
- All Implemented Interfaces:
Cloneable
,BatchCollector.BatchProducer
public class DdlPlan extends ProcessorPlan
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DdlPlan.SetPropertyProcessor
-
Field Summary
Fields Modifier and Type Field Description static boolean
ALLOW_ALTER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
alterInsteadOfTrigger(VDBMetaData vdb, Table t, String sql, Boolean enabled, Table.TriggerEvent event, boolean updateStore)
static void
alterProcedureDefinition(VDBMetaData vdb, Procedure p, String sql, boolean updateStore)
static void
alterView(VDBMetaData vdb, Table t, String sql, boolean updateStore)
ProcessorPlan
clone()
Return a safe clone of the ProcessorPlan.void
close()
Close the plan after processing.PlanNode
getDescriptionProperties()
List
getOutputElements()
Get list of resolved elements describing output columns for this plan.void
initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr)
Initialize the plan with some required pieces of data for making queries.TupleBatch
nextBatch()
Get a batch of results or possibly an Exception.void
open()
Open the plan for processing.static void
setColumnStats(VDBMetaData vdb, Column column, ColumnStats columnStats)
static String
setProperty(VDBMetaData vdb, AbstractMetadataRecord record, String key, String value)
static void
setTableStats(VDBMetaData vdb, Table table, TableStats tableStats)
String
toString()
-
Methods inherited from class org.teiid.query.processor.ProcessorPlan
addWarning, getBuffer, getContext, hasBuffer, requiresTransaction, reset, setContext
-
-
-
-
Constructor Detail
-
DdlPlan
public DdlPlan(Command command)
-
-
Method Detail
-
alterView
public static void alterView(VDBMetaData vdb, Table t, String sql, boolean updateStore)
-
setProperty
public static String setProperty(VDBMetaData vdb, AbstractMetadataRecord record, String key, String value)
-
setColumnStats
public static void setColumnStats(VDBMetaData vdb, Column column, ColumnStats columnStats)
-
setTableStats
public static void setTableStats(VDBMetaData vdb, Table table, TableStats tableStats)
-
alterProcedureDefinition
public static void alterProcedureDefinition(VDBMetaData vdb, Procedure p, String sql, boolean updateStore)
-
alterInsteadOfTrigger
public static void alterInsteadOfTrigger(VDBMetaData vdb, Table t, String sql, Boolean enabled, Table.TriggerEvent event, boolean updateStore)
-
clone
public ProcessorPlan clone()
Description copied from class:ProcessorPlan
Return a safe clone of the ProcessorPlan. A ProcessorPlan may only be safely cloned in between processings. That is, it is only safe to clone a plan before it isopened
or after it isclosed
.- Specified by:
clone
in classProcessorPlan
- Returns:
- safe clone of this ProcessorPlan, as long as it is not open for processing
-
close
public void close() throws TeiidComponentException
Description copied from class:ProcessorPlan
Close the plan after processing.- Specified by:
close
in interfaceBatchCollector.BatchProducer
- Specified by:
close
in classProcessorPlan
- Throws:
TeiidComponentException
-
getOutputElements
public List getOutputElements()
Description copied from class:ProcessorPlan
Get list of resolved elements describing output columns for this plan.- Specified by:
getOutputElements
in interfaceBatchCollector.BatchProducer
- Specified by:
getOutputElements
in classProcessorPlan
- Returns:
- List of SingleElementSymbol
-
initialize
public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr)
Description copied from class:ProcessorPlan
Initialize the plan with some required pieces of data for making queries. The data manager is used to make queries and the processorID must be passed with the request so the data manager can find the processor again.- Overrides:
initialize
in classProcessorPlan
- Parameters:
context
- Process execution contextdataMgr
- Data manager referencebufferMgr
- Buffer manager reference
-
nextBatch
public TupleBatch nextBatch() throws BlockedException, TeiidComponentException, TeiidProcessingException
Description copied from class:ProcessorPlan
Get a batch of results or possibly an Exception.- Specified by:
nextBatch
in interfaceBatchCollector.BatchProducer
- Specified by:
nextBatch
in classProcessorPlan
- Returns:
- Batch of results
- Throws:
BlockedException
- indicating next batch is not available yetTeiidComponentException
- for non-business rule exceptionTeiidProcessingException
- for business rule exception, related to user input or modeling
-
open
public void open() throws TeiidComponentException, TeiidProcessingException
Description copied from class:ProcessorPlan
Open the plan for processing.- Specified by:
open
in classProcessorPlan
- Throws:
TeiidComponentException
TeiidProcessingException
-
getDescriptionProperties
public PlanNode getDescriptionProperties()
- Overrides:
getDescriptionProperties
in classProcessorPlan
-
-