You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/11/14 09:43:15 UTC

[GitHub] [iotdb] JackieTien97 opened a new pull request #4382: New architecture of aligned timeseries

JackieTien97 opened a new pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382


   ## Description
   
   Previously, we use `vector` to contains a batch of timeseries who share the same time column. In previous implementation, we treat `vector` as a special `MNode` in `MTree` which is counter-intuitive conceptually.
   
   In this PR, we treat aligned as an attribute of device. That means a batch of timeseries who share the same time column is grouped under a device and then mark that device as aligned device. So, there is no more any special `MNode` in `MTree`. Instead, we add a new field `isAligned` in `EntityMNode`.
   
   As device has `isAligned` attribute, so the timeseries under it are either all aligned(share the same time column) or non-aligned(each timeseries has its own time column). It will never happen that one device has both aligned and non-aligned timeseries.
   
   Previously, we cannot add or delete sub sensors in `vector`. Currently, you can add or delete any aligned timeseries under that device as you like. 
   
   Previously, you can only delete from data of all sub sensors for one `vector` in some time range. Currently, you can treat aligned timeseries as common timeseries while doing deletion. You can delete from one of aligned timeseries under one device.
   
   In previous implementation, in you create `s1`, `s2` and `s3` as vector, even if you only write `s1` and `s2` for a certain period of time, we will waste some space in disk to save an empty `chunk` or `page` for `s3`. In this pr, we won't do this, we only save aligned timeseries which have data. Those aligned timeseries which don't have data, we won't even waste one bit for them.
   
   We also add  `MeasurementPath` and `AlignedPath` to represent for different types of full path. In previous implementation, we only have `PartialPath` which could stand for both partial path and full path. However, in some code path, like write and query executors, these `PartialPath` should all be fullPath. And some attributes like `alias` which should only exist in full path are removed from `PartialPath` to `MeasurementPath` and `AlignedPath`.
   
   After we add `MeasurementPath` and `AlignedPath` to represent full path, we could put schema info into these two class. In previous implementation, while parsing query sql to logical plan and then to physical plan, we first get `PartialPath` from `MTree` and then use thse `PartialPath` to ask `Mtree` again for schema info like data types which is redunctant. Now, after `removeStars` methods, we get full path, the schema info in already packed into path, we can directly use it in the following functions.
   
   There are many kinds of query in current IoTDB, so we will not support all of these for aligned timeseries in this PR., but it will be supported in the future. The following kinds of query are supported in this pr:
   - [*] raw query without value filter
   - [*] raw query without value filter
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] JackieTien97 commented on a change in pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
JackieTien97 commented on a change in pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#discussion_r748959031



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/template/Template.java
##########
@@ -88,11 +87,7 @@ public Template(CreateTemplatePlan plan) throws IllegalPathException {
             MetaUtils.splitPathToDetachedPath(plan.getMeasurements().get(i).get(0));
         String thisPrefix =
             joinBySeparator(Arrays.copyOf(thisMeasurement, thisMeasurement.length - 1));
-        if (plan.getAlignedPrefix() != null && plan.getAlignedPrefix().contains(thisPrefix)) {
-          isAlign = true;
-        } else {
-          isAlign = false;
-        }
+        isAlign = plan.getAlignedPrefix() != null && plan.getAlignedPrefix().contains(thisPrefix);

Review comment:
       yeap, already rename it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#issuecomment-970041919


   SonarCloud Quality Gate failed.&nbsp; &nbsp; ![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL) [316 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL)
   
   [![59.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/50-16px.png '59.4%')](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_coverage&view=list) [59.4% Coverage](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_coverage&view=list)  
   [![1.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.9%')](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_duplicated_lines_density&view=list) [1.9% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] qiaojialin merged pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
qiaojialin merged pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#issuecomment-969823735


   
   [![Coverage Status](https://coveralls.io/builds/44287621/badge)](https://coveralls.io/builds/44287621)
   
   Coverage increased (+0.002%) to 66.865% when pulling **d71dacb20b0b78226a10cb62d092285f0912f7e3 on new_vector** into **b3d9b2672cc3214b554f0552faa206bedcbb2780 on master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#issuecomment-969871080


   SonarCloud Quality Gate failed.&nbsp; &nbsp; ![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL) [316 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL)
   
   [![59.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/50-16px.png '59.4%')](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_coverage&view=list) [59.4% Coverage](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_coverage&view=list)  
   [![1.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.9%')](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_duplicated_lines_density&view=list) [1.9% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#issuecomment-969823735


   
   [![Coverage Status](https://coveralls.io/builds/44287694/badge)](https://coveralls.io/builds/44287694)
   
   Coverage decreased (-0.007%) to 66.856% when pulling **d71dacb20b0b78226a10cb62d092285f0912f7e3 on new_vector** into **b3d9b2672cc3214b554f0552faa206bedcbb2780 on master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] qiaojialin commented on a change in pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
qiaojialin commented on a change in pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#discussion_r748857790



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/template/Template.java
##########
@@ -88,11 +87,7 @@ public Template(CreateTemplatePlan plan) throws IllegalPathException {
             MetaUtils.splitPathToDetachedPath(plan.getMeasurements().get(i).get(0));
         String thisPrefix =
             joinBySeparator(Arrays.copyOf(thisMeasurement, thisMeasurement.length - 1));
-        if (plan.getAlignedPrefix() != null && plan.getAlignedPrefix().contains(thisPrefix)) {
-          isAlign = true;
-        } else {
-          isAlign = false;
-        }
+        isAlign = plan.getAlignedPrefix() != null && plan.getAlignedPrefix().contains(thisPrefix);

Review comment:
       alignedPrefix is deviceid?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] qiaojialin commented on a change in pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
qiaojialin commented on a change in pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#discussion_r748857312



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/path/MeasurementPath.java
##########
@@ -0,0 +1,291 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iotdb.db.metadata.path;
+
+import org.apache.iotdb.db.conf.IoTDBConstant;
+import org.apache.iotdb.db.engine.memtable.IWritableMemChunk;
+import org.apache.iotdb.db.engine.modification.Modification;
+import org.apache.iotdb.db.engine.modification.ModificationFile;
+import org.apache.iotdb.db.engine.querycontext.QueryDataSource;
+import org.apache.iotdb.db.engine.querycontext.ReadOnlyMemChunk;
+import org.apache.iotdb.db.engine.storagegroup.TsFileResource;
+import org.apache.iotdb.db.exception.metadata.IllegalPathException;
+import org.apache.iotdb.db.exception.query.QueryProcessException;
+import org.apache.iotdb.db.query.context.QueryContext;
+import org.apache.iotdb.db.query.executor.fill.LastPointReader;
+import org.apache.iotdb.db.query.filter.TsFileFilter;
+import org.apache.iotdb.db.query.reader.series.SeriesReader;
+import org.apache.iotdb.db.utils.QueryUtils;
+import org.apache.iotdb.db.utils.TestOnly;
+import org.apache.iotdb.db.utils.datastructure.TVList;
+import org.apache.iotdb.tsfile.file.metadata.IChunkMetadata;
+import org.apache.iotdb.tsfile.file.metadata.TimeseriesMetadata;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics;
+import org.apache.iotdb.tsfile.read.common.TimeRange;
+import org.apache.iotdb.tsfile.read.filter.basic.Filter;
+import org.apache.iotdb.tsfile.write.schema.IMeasurementSchema;
+import org.apache.iotdb.tsfile.write.schema.UnaryMeasurementSchema;
+import org.apache.iotdb.tsfile.write.writer.RestorableTsFileIOWriter;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class MeasurementPath extends PartialPath {
+
+  private IMeasurementSchema measurementSchema;
+
+  private boolean isUnderAlignedEntity = false;
+
+  // alias of measurement, null pointer cannot be serialized in thrift so empty string is instead
+  private String measurementAlias = "";

Review comment:
       change the related field in thrift to optional and set the default meassurementAlias to null 

##########
File path: server/src/main/java/org/apache/iotdb/db/query/dataset/groupby/GroupByLevelDataSet.java
##########
@@ -79,6 +79,10 @@ public GroupByLevelDataSet(GroupByTimePlan plan, GroupByEngineDataSet dataSet)
         }
       }
     }
+    // group by level's column number is different from other datasets
+    // TODO I don't know whether it's right or not in AlignedPath, remember to check here while
+    // adapting GroupByLevel query for new vector
+    super.columnNum = dataTypes.size();

Review comment:
       check

##########
File path: server/src/main/java/org/apache/iotdb/db/qp/physical/crud/InsertRowPlan.java
##########
@@ -340,11 +340,7 @@ public void serialize(DataOutputStream stream) throws IOException {
 
   public void subSerialize(DataOutputStream stream) throws IOException {
     stream.writeLong(time);
-    if (isAligned && originalPrefixPath != null) {
-      putString(stream, originalPrefixPath.getFullPath());
-    } else {
-      putString(stream, prefixPath.getFullPath());
-    }
+    putString(stream, prefixPath.getFullPath());

Review comment:
       ```suggestion
       putString(stream, devicePath.getFullPath());
   ```

##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/utils/ClusterQueryUtils.java
##########
@@ -67,41 +53,30 @@ public static void checkPathExistence(PartialPath path) throws QueryProcessExcep
     }
   }
 
-  public static void checkPathExistence(List<PartialPath> paths) throws QueryProcessException {
-    for (PartialPath path : paths) {
-      checkPathExistence(path);
-    }
-  }
-
   /**
    * Generate path string list for RPC request.
    *
-   * <p>If vector path, return its vectorId with all subSensors. Else just return path string.
+   * <p>If vector path, return its vectorId with all subSensors. Else just return path string. TODO
+   * aligned path
    */
-  public static List<String> getPathStrListForRequest(Path path) {
-    if (path instanceof VectorPartialPath) {
-      List<String> pathWithSubSensors =
-          new ArrayList<>(((VectorPartialPath) path).getSubSensorsList().size() + 1);
-      pathWithSubSensors.add(path.getFullPath());
-      pathWithSubSensors.addAll(((VectorPartialPath) path).getSubSensorsList());
-      return pathWithSubSensors;
-    } else {
-      return Collections.singletonList(path.getFullPath());
-    }
+  public static String getPathStrListForRequest(Path path) {
+    // TODO aligned Path
+    return path.getFullPath();

Review comment:
       check

##########
File path: server/src/main/java/org/apache/iotdb/db/query/dataset/AlignByDeviceDataSet.java
##########
@@ -84,7 +79,10 @@
   public AlignByDeviceDataSet(
       AlignByDevicePlan alignByDevicePlan, QueryContext context, IQueryRouter queryRouter) {
     super(null, alignByDevicePlan.getDataTypes());
-
+    // align by device's column number is different from other datasets
+    // TODO I don't know whether it's right or not in AlignedPath, remember to check here while
+    // adapting AlignByDevice query for new vector
+    super.columnNum = alignByDevicePlan.getDataTypes().size();

Review comment:
       remember to check this

##########
File path: server/src/main/java/org/apache/iotdb/db/query/dataset/SingleDataSet.java
##########
@@ -33,6 +33,10 @@
 
   public SingleDataSet(List<PartialPath> paths, List<TSDataType> dataTypes) {
     super(new ArrayList<>(paths), dataTypes);
+    // SingleDataSet's column number is different from other datasets
+    // TODO I don't know whether it's right or not in AlignedPath, remember to check here while
+    // adapting SingleDataSet query for new vector
+    super.columnNum = dataTypes.size();

Review comment:
       check




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls commented on pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#issuecomment-969823735


   
   [![Coverage Status](https://coveralls.io/builds/44286983/badge)](https://coveralls.io/builds/44286983)
   
   Coverage decreased (-0.05%) to 66.851% when pulling **237f1b53848df6ffad73a30995f1140e5b2f8515 on new_vector** into **c06ed22782ec107c03c8fc0c7e8c524665890f4f on master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#issuecomment-969823735


   
   [![Coverage Status](https://coveralls.io/builds/44291726/badge)](https://coveralls.io/builds/44291726)
   
   Coverage increased (+0.01%) to 66.877% when pulling **04648385a5cc762fbfc966d0509b614ba7570d35 on new_vector** into **b3d9b2672cc3214b554f0552faa206bedcbb2780 on master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] JackieTien97 commented on a change in pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
JackieTien97 commented on a change in pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#discussion_r748959591



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/path/MeasurementPath.java
##########
@@ -0,0 +1,291 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iotdb.db.metadata.path;
+
+import org.apache.iotdb.db.conf.IoTDBConstant;
+import org.apache.iotdb.db.engine.memtable.IWritableMemChunk;
+import org.apache.iotdb.db.engine.modification.Modification;
+import org.apache.iotdb.db.engine.modification.ModificationFile;
+import org.apache.iotdb.db.engine.querycontext.QueryDataSource;
+import org.apache.iotdb.db.engine.querycontext.ReadOnlyMemChunk;
+import org.apache.iotdb.db.engine.storagegroup.TsFileResource;
+import org.apache.iotdb.db.exception.metadata.IllegalPathException;
+import org.apache.iotdb.db.exception.query.QueryProcessException;
+import org.apache.iotdb.db.query.context.QueryContext;
+import org.apache.iotdb.db.query.executor.fill.LastPointReader;
+import org.apache.iotdb.db.query.filter.TsFileFilter;
+import org.apache.iotdb.db.query.reader.series.SeriesReader;
+import org.apache.iotdb.db.utils.QueryUtils;
+import org.apache.iotdb.db.utils.TestOnly;
+import org.apache.iotdb.db.utils.datastructure.TVList;
+import org.apache.iotdb.tsfile.file.metadata.IChunkMetadata;
+import org.apache.iotdb.tsfile.file.metadata.TimeseriesMetadata;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.file.metadata.statistics.Statistics;
+import org.apache.iotdb.tsfile.read.common.TimeRange;
+import org.apache.iotdb.tsfile.read.filter.basic.Filter;
+import org.apache.iotdb.tsfile.write.schema.IMeasurementSchema;
+import org.apache.iotdb.tsfile.write.schema.UnaryMeasurementSchema;
+import org.apache.iotdb.tsfile.write.writer.RestorableTsFileIOWriter;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class MeasurementPath extends PartialPath {
+
+  private IMeasurementSchema measurementSchema;
+
+  private boolean isUnderAlignedEntity = false;
+
+  // alias of measurement, null pointer cannot be serialized in thrift so empty string is instead
+  private String measurementAlias = "";

Review comment:
       I'm afraid we should keep it as empty string instead of `null`. In CCManager, it use list<string> to represent a list alias for a batch of measurements. thrift's list<string> doesn't support `null` in it. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] sonarcloud[bot] commented on pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] commented on pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#issuecomment-968577832


   SonarCloud Quality Gate failed.&nbsp; &nbsp; ![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL) [310 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL)
   
   [![60.1%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png '60.1%')](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_coverage&view=list) [60.1% Coverage](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_coverage&view=list)  
   [![1.6%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.6%')](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_duplicated_lines_density&view=list) [1.6% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#issuecomment-969823735


   
   [![Coverage Status](https://coveralls.io/builds/44288523/badge)](https://coveralls.io/builds/44288523)
   
   Coverage increased (+0.006%) to 66.869% when pulling **2d9bcf9430bc6e9251a424504301053252ee490b on new_vector** into **b3d9b2672cc3214b554f0552faa206bedcbb2780 on master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] sonarcloud[bot] removed a comment on pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#issuecomment-969871080


   SonarCloud Quality Gate failed.&nbsp; &nbsp; ![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL) [316 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL)
   
   [![59.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/50-16px.png '59.4%')](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_coverage&view=list) [59.4% Coverage](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_coverage&view=list)  
   [![1.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.9%')](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_duplicated_lines_density&view=list) [1.9% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] coveralls edited a comment on pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#issuecomment-969823735


   
   [![Coverage Status](https://coveralls.io/builds/44288418/badge)](https://coveralls.io/builds/44288418)
   
   Coverage decreased (-0.005%) to 66.858% when pulling **2d9bcf9430bc6e9251a424504301053252ee490b on new_vector** into **b3d9b2672cc3214b554f0552faa206bedcbb2780 on master**.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [iotdb] sonarcloud[bot] removed a comment on pull request #4382: New architecture of aligned timeseries

Posted by GitBox <gi...@apache.org>.
sonarcloud[bot] removed a comment on pull request #4382:
URL: https://github.com/apache/iotdb/pull/4382#issuecomment-968577832


   SonarCloud Quality Gate failed.&nbsp; &nbsp; ![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG) [![B](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/B-16px.png 'B')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG) [1 Bug](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT) [4 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL) [310 Code Smells](https://sonarcloud.io/project/issues?id=apache_incubator-iotdb&pullRequest=4382&resolved=false&types=CODE_SMELL)
   
   [![60.1%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/60-16px.png '60.1%')](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_coverage&view=list) [60.1% Coverage](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_coverage&view=list)  
   [![1.6%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.6%')](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_duplicated_lines_density&view=list) [1.6% Duplication](https://sonarcloud.io/component_measures?id=apache_incubator-iotdb&pullRequest=4382&metric=new_duplicated_lines_density&view=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org