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 classDdlPlan.SetPropertyProcessor
-
Field Summary
Fields Modifier and Type Field Description static booleanALLOW_ALTER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidalterInsteadOfTrigger(VDBMetaData vdb, Table t, String sql, Boolean enabled, Table.TriggerEvent event, boolean updateStore)static voidalterProcedureDefinition(VDBMetaData vdb, Procedure p, String sql, boolean updateStore)static voidalterView(VDBMetaData vdb, Table t, String sql, boolean updateStore)ProcessorPlanclone()Return a safe clone of the ProcessorPlan.voidclose()Close the plan after processing.PlanNodegetDescriptionProperties()ListgetOutputElements()Get list of resolved elements describing output columns for this plan.voidinitialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr)Initialize the plan with some required pieces of data for making queries.TupleBatchnextBatch()Get a batch of results or possibly an Exception.voidopen()Open the plan for processing.static voidsetColumnStats(VDBMetaData vdb, Column column, ColumnStats columnStats)static StringsetProperty(VDBMetaData vdb, AbstractMetadataRecord record, String key, String value)static voidsetTableStats(VDBMetaData vdb, Table table, TableStats tableStats)StringtoString()-
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:ProcessorPlanReturn 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 isopenedor after it isclosed.- Specified by:
clonein classProcessorPlan- Returns:
- safe clone of this ProcessorPlan, as long as it is not open for processing
-
close
public void close() throws TeiidComponentExceptionDescription copied from class:ProcessorPlanClose the plan after processing.- Specified by:
closein interfaceBatchCollector.BatchProducer- Specified by:
closein classProcessorPlan- Throws:
TeiidComponentException
-
getOutputElements
public List getOutputElements()
Description copied from class:ProcessorPlanGet list of resolved elements describing output columns for this plan.- Specified by:
getOutputElementsin interfaceBatchCollector.BatchProducer- Specified by:
getOutputElementsin classProcessorPlan- Returns:
- List of SingleElementSymbol
-
initialize
public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr)
Description copied from class:ProcessorPlanInitialize 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:
initializein classProcessorPlan- Parameters:
context- Process execution contextdataMgr- Data manager referencebufferMgr- Buffer manager reference
-
nextBatch
public TupleBatch nextBatch() throws BlockedException, TeiidComponentException, TeiidProcessingException
Description copied from class:ProcessorPlanGet a batch of results or possibly an Exception.- Specified by:
nextBatchin interfaceBatchCollector.BatchProducer- Specified by:
nextBatchin 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, TeiidProcessingExceptionDescription copied from class:ProcessorPlanOpen the plan for processing.- Specified by:
openin classProcessorPlan- Throws:
TeiidComponentExceptionTeiidProcessingException
-
getDescriptionProperties
public PlanNode getDescriptionProperties()
- Overrides:
getDescriptionPropertiesin classProcessorPlan
-
-