You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ja...@apache.org on 2022/01/04 01:47:29 UTC
[iotdb] branch master updated: Fix error in the test-only constructor of AlignedSeriesReader (#4675)
This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 010af34 Fix error in the test-only constructor of AlignedSeriesReader (#4675)
010af34 is described below
commit 010af34dda85847b249775f7241e06594a740b9f
Author: liuminghui233 <36...@users.noreply.github.com>
AuthorDate: Tue Jan 4 09:46:42 2022 +0800
Fix error in the test-only constructor of AlignedSeriesReader (#4675)
---
.../iotdb/db/metadata/path/MeasurementPath.java | 1 +
.../reader/series/SeriesRawDataBatchReader.java | 1 -
.../iotdb/db/query/reader/series/SeriesReader.java | 27 ++++------------------
3 files changed, 5 insertions(+), 24 deletions(-)
diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/path/MeasurementPath.java b/server/src/main/java/org/apache/iotdb/db/metadata/path/MeasurementPath.java
index 5222a9e..b481e47 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/path/MeasurementPath.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/path/MeasurementPath.java
@@ -196,6 +196,7 @@ public class MeasurementPath extends PartialPath {
Filter timeFilter,
Filter valueFilter,
boolean ascending) {
+ allSensors.add(this.getMeasurement());
return new SeriesReader(
this,
allSensors,
diff --git a/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesRawDataBatchReader.java b/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesRawDataBatchReader.java
index c2f1c90..ca3aab0 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesRawDataBatchReader.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesRawDataBatchReader.java
@@ -81,7 +81,6 @@ public class SeriesRawDataBatchReader implements ManagedSeriesReader {
Filter valueFilter,
boolean ascending) {
Set<String> allSensors = new HashSet<>();
- allSensors.add(seriesPath.getMeasurement());
this.seriesReader =
seriesPath.createSeriesReader(
allSensors,
diff --git a/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReader.java b/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReader.java
index b6fa3dc..d055e6a 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReader.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/reader/series/SeriesReader.java
@@ -117,28 +117,10 @@ public class SeriesReader {
protected BatchData cachedBatchData;
/**
- * @param seriesPath For querying vector, the seriesPath should be VectorPartialPath. If the query
- * is raw query without value filter, all sensors belonging to one vector should be all in
- * this one VectorPartialPath's subSensorsPathList, VectorPartialPath's own fullPath
- * represents the name of vector itself. Other queries, each sensor in one vector will have
- * its own SeriesReader, seriesPath's subSensorsPathList contains only one sensor.
- * @param allSensors For querying vector, allSensors contains vector name and all subSensors'
- * names in the seriesPath
- * <p>e.g. we have two vectors: root.sg1.d1.vector1(s1, s2) and root.sg1.d1.vector2(s1, s2),
- * If the sql is select * from root, we will construct two SeriesReader, The first one's
- * seriesPath is VectorPartialPath(root.sg1.d1.vector1, [root.sg1.d1.vector1.s1,
- * root.sg1.d1.vector1.s2]) The first one's allSensors is [vector1, s1, s2] The second one's
- * seriesPath is VectorPartialPath(root.sg1.d1.vector2, [root.sg1.d1.vector2.s1,
- * root.sg1.d1.vector2.s2]) The second one's allSensors is [vector2, s1, s2]
- * <p>If the sql is not RawQueryWithoutValueFilter, like select count(*) from root group by
- * ([1, 100), 5ms), we will construct four SeriesReader The first one's seriesPath is
- * VectorPartialPath(root.sg1.d1.vector1, [root.sg1.d1.vector1.s1]) The first one's allSensors
- * is [vector1, s1] The second one's seriesPath is VectorPartialPath(root.sg1.d1.vector1,
- * [root.sg1.d1.vector1.s2]) The second one's allSensors is [vector1, s2] The third one's
- * seriesPath is VectorPartialPath(root.sg1.d1.vector2, [root.sg1.d1.vector2.s1]) The third
- * one's allSensors is [vector2, s1] The fourth one's seriesPath is
- * VectorPartialPath(root.sg1.d1.vector2, [root.sg1.d1.vector2.s2]) The fourth one's
- * allSensors is [vector2, s2]
+ * @param seriesPath For querying aligned series, the seriesPath should be AlignedPath. All
+ * selected series belonging to one aligned device should be all in this one AlignedPath's
+ * measurementList.
+ * @param allSensors For querying aligned series, allSensors are not used.
*/
public SeriesReader(
PartialPath seriesPath,
@@ -195,7 +177,6 @@ public class SeriesReader {
boolean ascending) {
this.seriesPath = IDTable.translateQueryPath(seriesPath);
this.allSensors = allSensors;
- this.allSensors.add(seriesPath.getMeasurement());
this.dataType = dataType;
this.context = context;
this.timeFilter = timeFilter;