This is an automated email from the ASF dual-hosted git repository.
xingtanzjr pushed a commit to branch xingtanzjr/operator-design
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/xingtanzjr/operator-design by
this push:
new 496ec9a add RowBasedSeriesAggregateNode
496ec9a is described below
commit 496ec9a80395a2f3923d25a5424e34f8510b5e7f
Author: Jinrui.Zhang <[email protected]>
AuthorDate: Thu Mar 10 22:39:27 2022 +0800
add RowBasedSeriesAggregateNode
---
.../plan/process/RowBasedSeriesAggregateNode.java | 37 ++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git
a/cluster/src/main/java/org/apache/iotdb/cluster/query/distribution/plan/process/RowBasedSeriesAggregateNode.java
b/cluster/src/main/java/org/apache/iotdb/cluster/query/distribution/plan/process/RowBasedSeriesAggregateNode.java
new file mode 100644
index 0000000..5ed718e
--- /dev/null
+++
b/cluster/src/main/java/org/apache/iotdb/cluster/query/distribution/plan/process/RowBasedSeriesAggregateNode.java
@@ -0,0 +1,37 @@
+package org.apache.iotdb.cluster.query.distribution.plan.process;
+
+import org.apache.iotdb.cluster.query.distribution.common.GroupByTimeParameter;
+import org.apache.iotdb.cluster.query.distribution.plan.PlanNodeId;
+import org.apache.iotdb.db.query.expression.unary.FunctionExpression;
+
+import java.util.List;
+
+/**
+ * This node is used to aggregate required series by raw data.
+ * The raw data will be input as a TsBlock. This node will output the series
aggregated result represented by TsBlock
+ * Thus, the columns in output TsBlock will be different from input TsBlock.
+ */
+public class RowBasedSeriesAggregateNode extends ProcessNode {
+ // The parameter of `group by time`
+ // Its value will be null if there is no `group by time` clause,
+ private GroupByTimeParameter groupByTimeParameter;
+
+ // The list of aggregation functions, each FunctionExpression will be
output as one column of result TsBlock
+ // (Currently we only support one series in the aggregation function)
+ // TODO: need consider whether it is suitable the aggregation function
using FunctionExpression
+ private List<FunctionExpression> aggregateFuncList;
+
+ public RowBasedSeriesAggregateNode(PlanNodeId id) {
+ super(id);
+ }
+
+ public RowBasedSeriesAggregateNode(PlanNodeId id, List<FunctionExpression>
aggregateFuncList) {
+ this(id);
+ this.aggregateFuncList = aggregateFuncList;
+ }
+
+ public RowBasedSeriesAggregateNode(PlanNodeId id, List<FunctionExpression>
aggregateFuncList, GroupByTimeParameter groupByTimeParameter) {
+ this(id, aggregateFuncList);
+ this.groupByTimeParameter = groupByTimeParameter;
+ }
+}