Class LimitNode
- java.lang.Object
-
- org.teiid.query.processor.relational.RelationalNode
-
- org.teiid.query.processor.relational.LimitNode
-
- All Implemented Interfaces:
Cloneable
,BatchCollector.BatchProducer
public class LimitNode extends RelationalNode
-
-
Field Summary
-
Fields inherited from class org.teiid.query.processor.relational.RelationalNode
childCount
-
-
Constructor Summary
Constructors Constructor Description LimitNode(int nodeID, Expression limitExpr, Expression offsetExpr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
All the implementation of Cloneable interface need to implement clone() method.TupleBuffer
getBufferDirect(int maxRows)
For subclasses to override if they wish to return a buffer rather than batches.PlanNode
getDescriptionProperties()
int
getLimit()
Expression
getLimitExpr()
protected void
getNodeString(StringBuffer buf)
int
getOffset()
Expression
getOffsetExpr()
boolean
hasBuffer()
Return true if the node provides a final buffer via getBufferboolean
isImplicit()
protected TupleBatch
nextBatchDirect()
Template method for subclasses to implement.void
open()
void
reset()
void
setImplicit(boolean implicit)
-
Methods inherited from class org.teiid.query.processor.relational.RelationalNode
addBatchRow, addChild, close, closeDirect, copyTo, createLookupMap, getBatchSize, getBuffer, getBufferManager, getChildCount, getChildren, getClassName, getConnectionID, getContext, getDataManager, getElements, getEstimateNodeCardinality, getID, getNodeStatistics, getOutputElements, getParent, getProjectionIndexes, hasPendingRows, initialize, isBatchFull, isClosed, isLastBatch, nextBatch, nodeToString, projectTuple, projectTuple, pullBatch, requiresTransaction, setContext, setElements, setEstimateDepAccessCardinality, setEstimateDepJoinCost, setEstimateJoinCost, setEstimateNodeCardinality, setEstimateNodeSetSize, setID, setParent, terminateBatches, toString, unwrapException
-
-
-
-
Constructor Detail
-
LimitNode
public LimitNode(int nodeID, Expression limitExpr, Expression offsetExpr)
-
-
Method Detail
-
setImplicit
public void setImplicit(boolean implicit)
-
isImplicit
public boolean isImplicit()
-
nextBatchDirect
protected TupleBatch nextBatchDirect() throws BlockedException, TeiidComponentException, TeiidProcessingException
Description copied from class:RelationalNode
Template method for subclasses to implement.- Specified by:
nextBatchDirect
in classRelationalNode
- Returns:
- Throws:
BlockedException
TeiidComponentException
TeiidProcessingException
- if exception related to user input occured
-
open
public void open() throws TeiidComponentException, TeiidProcessingException
- Overrides:
open
in classRelationalNode
- Throws:
TeiidComponentException
TeiidProcessingException
-
reset
public void reset()
- Overrides:
reset
in classRelationalNode
-
getNodeString
protected void getNodeString(StringBuffer buf)
- Overrides:
getNodeString
in classRelationalNode
-
getDescriptionProperties
public PlanNode getDescriptionProperties()
- Overrides:
getDescriptionProperties
in classRelationalNode
-
clone
public Object clone()
Description copied from class:RelationalNode
All the implementation of Cloneable interface need to implement clone() method. The plan is only clonable in the pre-execution stage, not the execution state (things like program state, result sets, etc). It's only safe to call that method in between query processings, in other words, it's only safe to call clone() on a plan after nextTuple() returns null, meaning the plan has finished processing.- Specified by:
clone
in classRelationalNode
-
getLimitExpr
public Expression getLimitExpr()
-
getOffsetExpr
public Expression getOffsetExpr()
-
getLimit
public int getLimit()
-
getOffset
public int getOffset()
-
hasBuffer
public boolean hasBuffer()
Description copied from class:RelationalNode
Return true if the node provides a final buffer via getBuffer- Specified by:
hasBuffer
in interfaceBatchCollector.BatchProducer
- Overrides:
hasBuffer
in classRelationalNode
-
getBufferDirect
public TupleBuffer getBufferDirect(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException
Description copied from class:RelationalNode
For subclasses to override if they wish to return a buffer rather than batches.- Overrides:
getBufferDirect
in classRelationalNode
- Returns:
- Throws:
BlockedException
TeiidComponentException
TeiidProcessingException
-
-