Class RelationalPlan
- java.lang.Object
-
- org.teiid.query.processor.ProcessorPlan
-
- org.teiid.query.processor.relational.RelationalPlan
-
- All Implemented Interfaces:
Cloneable
,BatchCollector.BatchProducer
public class RelationalPlan extends ProcessorPlan
-
-
Constructor Summary
Constructors Constructor Description RelationalPlan(RelationalNode node)
Constructor for RelationalPlan.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RelationalPlan
clone()
Return a safe clone of the ProcessorPlan.void
close()
Close the plan after processing.TupleBuffer
getBuffer(int maxRows)
return the final tuple buffer or null if not availablePlanNode
getDescriptionProperties()
List<? extends Expression>
getOutputElements()
Get list of resolved elements describing output columns for this plan.RelationalNode
getRootNode()
boolean
hasBuffer()
Return true if the plan provides a final buffer via getBuffervoid
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.Boolean
requiresTransaction(boolean transactionalReads)
void
reset()
Reset a plan so that it can be processed again.void
setOutputElements(List<? extends Expression> outputCols)
void
setRootNode(RelationalNode root)
void
setWith(List<WithQueryCommand> with)
String
toString()
-
Methods inherited from class org.teiid.query.processor.ProcessorPlan
addWarning, getContext, setContext
-
-
-
-
Constructor Detail
-
RelationalPlan
public RelationalPlan(RelationalNode node)
Constructor for RelationalPlan.
-
-
Method Detail
-
getRootNode
public RelationalNode getRootNode()
-
setRootNode
public void setRootNode(RelationalNode root)
-
setWith
public void setWith(List<WithQueryCommand> with)
-
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
-
getOutputElements
public List<? extends Expression> getOutputElements()
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
-
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
-
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- See Also:
ProcessorPlan.nextBatch()
-
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
-
reset
public void reset()
Description copied from class:ProcessorPlan
Reset a plan so that it can be processed again.- Overrides:
reset
in classProcessorPlan
- See Also:
ProcessorPlan.reset()
-
clone
public RelationalPlan 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
-
getDescriptionProperties
public PlanNode getDescriptionProperties()
- Overrides:
getDescriptionProperties
in classProcessorPlan
-
setOutputElements
public void setOutputElements(List<? extends Expression> outputCols)
- Parameters:
outputCols
- The outputCols to set.
-
requiresTransaction
public Boolean requiresTransaction(boolean transactionalReads)
- Overrides:
requiresTransaction
in classProcessorPlan
-
getBuffer
public TupleBuffer getBuffer(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException
Description copied from class:ProcessorPlan
return the final tuple buffer or null if not available- Specified by:
getBuffer
in interfaceBatchCollector.BatchProducer
- Overrides:
getBuffer
in classProcessorPlan
- Returns:
- Throws:
BlockedException
TeiidComponentException
TeiidProcessingException
-
hasBuffer
public boolean hasBuffer()
Description copied from class:ProcessorPlan
Return true if the plan provides a final buffer via getBuffer- Specified by:
hasBuffer
in interfaceBatchCollector.BatchProducer
- Overrides:
hasBuffer
in classProcessorPlan
-
-