Class SchemaQueryScanOperator
- java.lang.Object
-
- org.apache.iotdb.db.mpp.execution.operator.schema.SchemaQueryScanOperator
-
- All Implemented Interfaces:
java.lang.AutoCloseable,Operator,SourceOperator
- Direct Known Subclasses:
DevicesSchemaScanOperator,PathsUsingTemplateScanOperator,TimeSeriesSchemaScanOperator
public abstract class SchemaQueryScanOperator extends java.lang.Object implements SourceOperator
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanisFinishedprotected booleanisPrefixPathprotected intlimitprotected intoffsetprotected OperatorContextoperatorContextprotected org.apache.iotdb.commons.path.PartialPathpartialPathprotected PlanNodeIdsourceIdprotected org.apache.iotdb.tsfile.read.common.block.TsBlocktsBlock-
Fields inherited from interface org.apache.iotdb.db.mpp.execution.operator.Operator
NOT_BLOCKED
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSchemaQueryScanOperator(PlanNodeId sourceId, OperatorContext operatorContext, int limit, int offset, org.apache.iotdb.commons.path.PartialPath partialPath, boolean isPrefixPath)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description longcalculateMaxPeekMemory()We should also consider the memory used by its children operator, so the calculation logic may be like: long estimatedOfCurrentOperator = XXXXX; return max(estimatedOfCurrentOperator, child1.calculateMaxPeekMemory(), child2.calculateMaxPeekMemory(), ....)longcalculateMaxReturnSize()longcalculateRetainedSizeAfterCallingNext()protected abstract org.apache.iotdb.tsfile.read.common.block.TsBlockcreateTsBlock()intgetLimit()intgetOffset()OperatorContextgetOperatorContext()org.apache.iotdb.commons.path.PartialPathgetPartialPath()PlanNodeIdgetSourceId()booleanhasNext()booleanisFinished()Is this operator completely finished processing and no more output TsBlock will be produced.booleanisPrefixPath()org.apache.iotdb.tsfile.read.common.block.TsBlocknext()Gets next tsBlock from this operator.voidsetLimit(int limit)voidsetOffset(int offset)
-
-
-
Field Detail
-
operatorContext
protected OperatorContext operatorContext
-
tsBlock
protected org.apache.iotdb.tsfile.read.common.block.TsBlock tsBlock
-
isFinished
protected boolean isFinished
-
limit
protected int limit
-
offset
protected int offset
-
partialPath
protected org.apache.iotdb.commons.path.PartialPath partialPath
-
isPrefixPath
protected boolean isPrefixPath
-
sourceId
protected PlanNodeId sourceId
-
-
Constructor Detail
-
SchemaQueryScanOperator
protected SchemaQueryScanOperator(PlanNodeId sourceId, OperatorContext operatorContext, int limit, int offset, org.apache.iotdb.commons.path.PartialPath partialPath, boolean isPrefixPath)
-
-
Method Detail
-
createTsBlock
protected abstract org.apache.iotdb.tsfile.read.common.block.TsBlock createTsBlock()
-
getPartialPath
public org.apache.iotdb.commons.path.PartialPath getPartialPath()
-
getLimit
public int getLimit()
-
getOffset
public int getOffset()
-
setLimit
public void setLimit(int limit)
-
setOffset
public void setOffset(int offset)
-
isPrefixPath
public boolean isPrefixPath()
-
getOperatorContext
public OperatorContext getOperatorContext()
- Specified by:
getOperatorContextin interfaceOperator
-
next
public org.apache.iotdb.tsfile.read.common.block.TsBlock next()
Description copied from interface:OperatorGets next tsBlock from this operator. If no data is currently available, return null.
-
hasNext
public boolean hasNext()
-
isFinished
public boolean isFinished()
Description copied from interface:OperatorIs this operator completely finished processing and no more output TsBlock will be produced.- Specified by:
isFinishedin interfaceOperator
-
getSourceId
public PlanNodeId getSourceId()
- Specified by:
getSourceIdin interfaceSourceOperator
-
calculateMaxPeekMemory
public long calculateMaxPeekMemory()
Description copied from interface:OperatorWe should also consider the memory used by its children operator, so the calculation logic may be like: long estimatedOfCurrentOperator = XXXXX; return max(estimatedOfCurrentOperator, child1.calculateMaxPeekMemory(), child2.calculateMaxPeekMemory(), ....)Each operator's MaxPeekMemory should also take retained size of each child operator into account.
- Specified by:
calculateMaxPeekMemoryin interfaceOperator- Returns:
- estimated max memory footprint that the Operator Tree(rooted from this operator) will use while doing its own query processing
-
calculateMaxReturnSize
public long calculateMaxReturnSize()
- Specified by:
calculateMaxReturnSizein interfaceOperator- Returns:
- estimated max memory footprint for returned TsBlock when calling operator.next()
-
calculateRetainedSizeAfterCallingNext
public long calculateRetainedSizeAfterCallingNext()
- Specified by:
calculateRetainedSizeAfterCallingNextin interfaceOperator- Returns:
- each operator's retained size(including all its children's retained size) after calling its next() method
-
-