You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hu...@apache.org on 2022/11/21 07:19:39 UTC
[iotdb] branch lmh/FixGroupByMonth created (now 1728b0c233)
This is an automated email from the ASF dual-hosted git repository.
hui pushed a change to branch lmh/FixGroupByMonth
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 1728b0c233 copy timeFilter when initQueryDataSource & initOperator
This branch includes the following new commits:
new 1728b0c233 copy timeFilter when initQueryDataSource & initOperator
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[iotdb] 01/01: copy timeFilter when initQueryDataSource & initOperator
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hui pushed a commit to branch lmh/FixGroupByMonth
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 1728b0c233ea38fc8153173e92da64a9fa33ecf1
Author: liuminghui233 <54...@qq.com>
AuthorDate: Mon Nov 21 15:19:08 2022 +0800
copy timeFilter when initQueryDataSource & initOperator
---
.../iotdb/db/mpp/execution/driver/DataDriver.java | 2 +-
.../db/mpp/plan/planner/OperatorTreeGenerator.java | 19 +++++++++++++------
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/driver/DataDriver.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/driver/DataDriver.java
index ba6909e4fa..4aec571d48 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/driver/DataDriver.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/driver/DataDriver.java
@@ -136,7 +136,7 @@ public class DataDriver extends Driver {
pathList,
selectedDeviceIdSet.size() == 1 ? selectedDeviceIdSet.iterator().next() : null,
driverContext.getFragmentInstanceContext(),
- context.getTimeFilter());
+ context.getTimeFilter().copy());
// used files should be added before mergeLock is unlocked, or they may be deleted by
// running merge
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/OperatorTreeGenerator.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/OperatorTreeGenerator.java
index c7964ae828..484a342715 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/OperatorTreeGenerator.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/OperatorTreeGenerator.java
@@ -177,6 +177,7 @@ import org.apache.iotdb.db.utils.datastructure.TimeSelector;
import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
import org.apache.iotdb.tsfile.read.TimeValuePair;
import org.apache.iotdb.tsfile.read.common.block.TsBlockBuilder;
+import org.apache.iotdb.tsfile.read.filter.basic.Filter;
import org.apache.iotdb.tsfile.read.filter.operator.Gt;
import org.apache.iotdb.tsfile.read.filter.operator.GtEq;
import org.apache.iotdb.tsfile.utils.Binary;
@@ -243,6 +244,8 @@ public class OperatorTreeGenerator extends PlanVisitor<Operator, LocalExecutionP
node.getPlanNodeId(),
SeriesScanOperator.class.getSimpleName());
+ Filter timeFilter = node.getTimeFilter();
+ Filter valueFilter = node.getValueFilter();
SeriesScanOperator seriesScanOperator =
new SeriesScanOperator(
node.getPlanNodeId(),
@@ -250,8 +253,8 @@ public class OperatorTreeGenerator extends PlanVisitor<Operator, LocalExecutionP
context.getAllSensors(seriesPath.getDevice(), seriesPath.getMeasurement()),
seriesPath.getSeriesType(),
operatorContext,
- node.getTimeFilter(),
- node.getValueFilter(),
+ timeFilter != null ? timeFilter.copy() : null,
+ valueFilter != null ? valueFilter.copy() : null,
ascending);
context.addSourceOperator(seriesScanOperator);
@@ -273,13 +276,15 @@ public class OperatorTreeGenerator extends PlanVisitor<Operator, LocalExecutionP
node.getPlanNodeId(),
AlignedSeriesScanOperator.class.getSimpleName());
+ Filter timeFilter = node.getTimeFilter();
+ Filter valueFilter = node.getValueFilter();
AlignedSeriesScanOperator seriesScanOperator =
new AlignedSeriesScanOperator(
node.getPlanNodeId(),
seriesPath,
operatorContext,
- node.getTimeFilter(),
- node.getValueFilter(),
+ timeFilter != null ? timeFilter.copy() : null,
+ valueFilter != null ? valueFilter.copy() : null,
ascending);
context.addSourceOperator(seriesScanOperator);
@@ -320,6 +325,7 @@ public class OperatorTreeGenerator extends PlanVisitor<Operator, LocalExecutionP
AggregationUtil.calculateMaxAggregationResultSize(
node.getAggregationDescriptorList(), timeRangeIterator, context.getTypeProvider());
+ Filter timeFilter = node.getTimeFilter();
SeriesAggregationScanOperator aggregateScanOperator =
new SeriesAggregationScanOperator(
node.getPlanNodeId(),
@@ -328,7 +334,7 @@ public class OperatorTreeGenerator extends PlanVisitor<Operator, LocalExecutionP
operatorContext,
aggregators,
timeRangeIterator,
- node.getTimeFilter(),
+ timeFilter != null ? timeFilter.copy() : null,
ascending,
node.getGroupByTimeParameter(),
maxReturnSize);
@@ -381,6 +387,7 @@ public class OperatorTreeGenerator extends PlanVisitor<Operator, LocalExecutionP
AggregationUtil.calculateMaxAggregationResultSize(
node.getAggregationDescriptorList(), timeRangeIterator, context.getTypeProvider());
+ Filter timeFilter = node.getTimeFilter();
AlignedSeriesAggregationScanOperator seriesAggregationScanOperator =
new AlignedSeriesAggregationScanOperator(
node.getPlanNodeId(),
@@ -388,7 +395,7 @@ public class OperatorTreeGenerator extends PlanVisitor<Operator, LocalExecutionP
operatorContext,
aggregators,
timeRangeIterator,
- node.getTimeFilter(),
+ timeFilter != null ? timeFilter.copy() : null,
ascending,
groupByTimeParameter,
maxReturnSize);