Class SeriesAggregationScanNode
- java.lang.Object
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.source.SourceNode
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.source.SeriesSourceNode
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.source.SeriesAggregationSourceNode
-
- org.apache.iotdb.db.mpp.plan.planner.plan.node.source.SeriesAggregationScanNode
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.apache.iotdb.consensus.common.request.IConsensusRequest,IPartitionRelatedNode
public class SeriesAggregationScanNode extends SeriesAggregationSourceNode
This node is responsible to do the aggregation calculation for one series. It will read the target series and calculate the aggregation result by the aggregation digest or raw data of this series.The aggregation result will be represented as a TsBlock
This node will split data of the target series into many groups by time range and do the aggregation calculation for each group. Each result will be one row of the result TsBlock. The timestamp of each row is the start time of the time range group.
If there is no time range split parameter, the result TsBlock will only contain one row, which represent the whole aggregation result of this series. And the timestamp will be 0, which is meaningless.
-
-
Field Summary
-
Fields inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.source.SeriesAggregationSourceNode
aggregationDescriptorList, groupByTimeParameter, scanOrder, timeFilter
-
Fields inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode
CHILD_COUNT_NO_LIMIT, NO_CHILD_ALLOWED, ONE_CHILD
-
-
Constructor Summary
Constructors Constructor Description SeriesAggregationScanNode(PlanNodeId id, MeasurementPath seriesPath, java.util.List<AggregationDescriptor> aggregationDescriptorList)SeriesAggregationScanNode(PlanNodeId id, MeasurementPath seriesPath, java.util.List<AggregationDescriptor> aggregationDescriptorList, Ordering scanOrder, GroupByTimeParameter groupByTimeParameter)SeriesAggregationScanNode(PlanNodeId id, MeasurementPath seriesPath, java.util.List<AggregationDescriptor> aggregationDescriptorList, Ordering scanOrder, org.apache.iotdb.tsfile.read.filter.basic.Filter timeFilter, GroupByTimeParameter groupByTimeParameter, org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet dataRegionReplicaSet)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,C>
Raccept(PlanVisitor<R,C> visitor, C context)voidaddChild(PlanNode child)intallowedChildCount()PlanNodeclone()voidclose()static SeriesAggregationScanNodedeserialize(java.nio.ByteBuffer byteBuffer)booleanequals(java.lang.Object o)java.util.List<PlanNode>getChildren()GroupByTimeParametergetGroupByTimeParameter()java.util.List<java.lang.String>getOutputColumnNames()org.apache.iotdb.commons.path.PartialPathgetPartitionPath()org.apache.iotdb.tsfile.read.filter.basic.FiltergetPartitionTimeFilter()org.apache.iotdb.common.rpc.thrift.TRegionReplicaSetgetRegionReplicaSet()OrderinggetScanOrder()MeasurementPathgetSeriesPath()org.apache.iotdb.tsfile.read.filter.basic.FiltergetTimeFilter()inthashCode()voidopen()protected voidserializeAttributes(java.io.DataOutputStream stream)protected voidserializeAttributes(java.nio.ByteBuffer byteBuffer)voidsetRegionReplicaSet(org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet regionReplicaSet)voidsetTimeFilter(org.apache.iotdb.tsfile.read.filter.basic.Filter timeFilter)java.lang.StringtoString()-
Methods inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.source.SeriesAggregationSourceNode
getAggregationDescriptorList, setAggregationDescriptorList
-
Methods inherited from class org.apache.iotdb.db.mpp.plan.planner.plan.node.PlanNode
cloneWithChildren, getPlanNodeId, serialize, serialize, serializeToByteBuffer, setPlanNodeId
-
-
-
-
Constructor Detail
-
SeriesAggregationScanNode
public SeriesAggregationScanNode(PlanNodeId id, MeasurementPath seriesPath, java.util.List<AggregationDescriptor> aggregationDescriptorList)
-
SeriesAggregationScanNode
public SeriesAggregationScanNode(PlanNodeId id, MeasurementPath seriesPath, java.util.List<AggregationDescriptor> aggregationDescriptorList, Ordering scanOrder, @Nullable GroupByTimeParameter groupByTimeParameter)
-
SeriesAggregationScanNode
public SeriesAggregationScanNode(PlanNodeId id, MeasurementPath seriesPath, java.util.List<AggregationDescriptor> aggregationDescriptorList, Ordering scanOrder, @Nullable org.apache.iotdb.tsfile.read.filter.basic.Filter timeFilter, @Nullable GroupByTimeParameter groupByTimeParameter, org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet dataRegionReplicaSet)
-
-
Method Detail
-
getScanOrder
public Ordering getScanOrder()
- Overrides:
getScanOrderin classSeriesAggregationSourceNode
-
getTimeFilter
@Nullable public org.apache.iotdb.tsfile.read.filter.basic.Filter getTimeFilter()
- Overrides:
getTimeFilterin classSeriesAggregationSourceNode
-
setTimeFilter
public void setTimeFilter(@Nullable org.apache.iotdb.tsfile.read.filter.basic.Filter timeFilter)
-
getGroupByTimeParameter
@Nullable public GroupByTimeParameter getGroupByTimeParameter()
- Overrides:
getGroupByTimeParameterin classSeriesAggregationSourceNode
-
getSeriesPath
public MeasurementPath getSeriesPath()
-
getChildren
public java.util.List<PlanNode> getChildren()
- Specified by:
getChildrenin classPlanNode
-
allowedChildCount
public int allowedChildCount()
- Specified by:
allowedChildCountin classPlanNode
-
getOutputColumnNames
public java.util.List<java.lang.String> getOutputColumnNames()
- Specified by:
getOutputColumnNamesin classPlanNode
-
open
public void open() throws java.lang.Exception- Specified by:
openin classSourceNode- Throws:
java.lang.Exception
-
getRegionReplicaSet
public org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet getRegionReplicaSet()
-
setRegionReplicaSet
public void setRegionReplicaSet(org.apache.iotdb.common.rpc.thrift.TRegionReplicaSet regionReplicaSet)
- Specified by:
setRegionReplicaSetin classSourceNode
-
close
public void close() throws java.lang.Exception- Throws:
java.lang.Exception
-
accept
public <R,C> R accept(PlanVisitor<R,C> visitor, C context)
-
serializeAttributes
protected void serializeAttributes(java.nio.ByteBuffer byteBuffer)
- Specified by:
serializeAttributesin classPlanNode
-
serializeAttributes
protected void serializeAttributes(java.io.DataOutputStream stream) throws java.io.IOException- Specified by:
serializeAttributesin classPlanNode- Throws:
java.io.IOException
-
deserialize
public static SeriesAggregationScanNode deserialize(java.nio.ByteBuffer byteBuffer)
-
getPartitionPath
public org.apache.iotdb.commons.path.PartialPath getPartitionPath()
- Specified by:
getPartitionPathin classSeriesSourceNode
-
getPartitionTimeFilter
public org.apache.iotdb.tsfile.read.filter.basic.Filter getPartitionTimeFilter()
- Specified by:
getPartitionTimeFilterin classSeriesSourceNode
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-