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 Objectclone()All the implementation of Cloneable interface need to implement clone() method.TupleBuffergetBufferDirect(int maxRows)For subclasses to override if they wish to return a buffer rather than batches.PlanNodegetDescriptionProperties()intgetLimit()ExpressiongetLimitExpr()protected voidgetNodeString(StringBuffer buf)intgetOffset()ExpressiongetOffsetExpr()booleanhasBuffer()Return true if the node provides a final buffer via getBufferbooleanisImplicit()protected TupleBatchnextBatchDirect()Template method for subclasses to implement.voidopen()voidreset()voidsetImplicit(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:RelationalNodeTemplate method for subclasses to implement.- Specified by:
nextBatchDirectin classRelationalNode- Returns:
- Throws:
BlockedExceptionTeiidComponentExceptionTeiidProcessingException- if exception related to user input occured
-
open
public void open() throws TeiidComponentException, TeiidProcessingException- Overrides:
openin classRelationalNode- Throws:
TeiidComponentExceptionTeiidProcessingException
-
reset
public void reset()
- Overrides:
resetin classRelationalNode
-
getNodeString
protected void getNodeString(StringBuffer buf)
- Overrides:
getNodeStringin classRelationalNode
-
getDescriptionProperties
public PlanNode getDescriptionProperties()
- Overrides:
getDescriptionPropertiesin classRelationalNode
-
clone
public Object clone()
Description copied from class:RelationalNodeAll 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:
clonein 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:RelationalNodeReturn true if the node provides a final buffer via getBuffer- Specified by:
hasBufferin interfaceBatchCollector.BatchProducer- Overrides:
hasBufferin classRelationalNode
-
getBufferDirect
public TupleBuffer getBufferDirect(int maxRows) throws BlockedException, TeiidComponentException, TeiidProcessingException
Description copied from class:RelationalNodeFor subclasses to override if they wish to return a buffer rather than batches.- Overrides:
getBufferDirectin classRelationalNode- Returns:
- Throws:
BlockedExceptionTeiidComponentExceptionTeiidProcessingException
-
-