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/10/29 08:39:30 UTC

[GitHub] [iotdb] zyk990424 opened a new pull request #4268: [To new_vector] Add MeasurementPath and Refactor groupVectorPath

zyk990424 opened a new pull request #4268:
URL: https://github.com/apache/iotdb/pull/4268


   ## Description
   
   1. add MeasurementPath containing schema, which helps reduce the interaction between query and mtree
   2. if an measurementMNdoe is under aligned device, return VectorPartialPath to query first and group them later ( i don't think this logic make any sense )
   


-- 
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] zyk990424 commented on a change in pull request #4268: [To new_vector] Add MeasurementPath and Refactor groupVectorPath

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



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/VectorPartialPath.java
##########
@@ -56,6 +65,14 @@ public VectorPartialPath(PartialPath vectorPath, String subSensor) {
     subSensorsList.add(subSensor);
   }
 
+  public VectorPartialPath(MeasurementPath path) {
+    super(path.getDevicePath().getNodes());
+    subSensorsList = new ArrayList<>();
+    subSensorsList.add(path.getMeasurement());
+    schemaList = new ArrayList<>();
+    schemaList.add(path.getMeasurementSchema());
+  }
+
   public List<String> getSubSensorsList() {

Review comment:
       Fixed.




-- 
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 #4268: [To new_vector] Add MeasurementPath and Refactor groupVectorPath

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



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/VectorPartialPath.java
##########
@@ -34,7 +39,11 @@
  */
 public class VectorPartialPath extends PartialPath {

Review comment:
       ```suggestion
   public class AlignedPaths extends PartialPath {
   ```

##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/VectorPartialPath.java
##########
@@ -111,6 +155,15 @@ public int hashCode() {
     return Objects.hash(super.hashCode(), subSensorsList);
   }
 
+  @Override
+  public PartialPath getExactPath() {

Review comment:
       what is this for?

##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/VectorPartialPath.java
##########
@@ -34,7 +39,11 @@
  */
 public class VectorPartialPath extends PartialPath {
 
+  // todo improve vector implementation by remove this placeholder
+  private static final String VECTOR_PLACEHOLDER = "";
+
   private List<String> subSensorsList;

Review comment:
       ```suggestion
     private List<String> measurementList;
   ```

##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/mnode/MeasurementMNode.java
##########
@@ -74,6 +75,19 @@ public IEntityMNode getParent() {
     return parent.getAsEntityMNode();
   }
 
+  /**
+   * get MeasurementPath of this node
+   *
+   * @return MeasurementPath
+   */
+  @Override
+  public MeasurementPath getPartialPath() {
+    MeasurementPath result = new MeasurementPath(super.getPartialPath());
+    //    result.setMeasurementAlias(alias);

Review comment:
       remove

##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/VectorPartialPath.java
##########
@@ -56,6 +65,14 @@ public VectorPartialPath(PartialPath vectorPath, String subSensor) {
     subSensorsList.add(subSensor);
   }
 
+  public VectorPartialPath(MeasurementPath path) {
+    super(path.getDevicePath().getNodes());
+    subSensorsList = new ArrayList<>();
+    subSensorsList.add(path.getMeasurement());
+    schemaList = new ArrayList<>();
+    schemaList.add(path.getMeasurementSchema());
+  }
+
   public List<String> getSubSensorsList() {

Review comment:
       ```suggestion
     public List<String> getMeasurementList() {
   ```

##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/mnode/IMeasurementMNode.java
##########
@@ -29,6 +30,9 @@
   @Override
   IEntityMNode getParent();
 
+  @Override
+  MeasurementPath getPartialPath();

Review comment:
       ```suggestion
     MeasurementPath getMeasurementPath();
   ```




-- 
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 #4268: [To new_vector] Add MeasurementPath and Refactor groupVectorPath

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



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/mnode/MeasurementMNode.java
##########
@@ -74,6 +75,19 @@ public IEntityMNode getParent() {
     return parent.getAsEntityMNode();
   }
 
+  /**
+   * get MeasurementPath of this node
+   *
+   * @return MeasurementPath
+   */
+  @Override
+  public MeasurementPath getPartialPath() {
+    MeasurementPath result = new MeasurementPath(super.getPartialPath());
+    //    result.setMeasurementAlias(alias);

Review comment:
       remove




-- 
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 #4268: [To new_vector] Add MeasurementPath and Refactor groupVectorPath

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


   


-- 
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 #4268: [To new_vector] Add MeasurementPath and Refactor groupVectorPath

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



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/mnode/MeasurementMNode.java
##########
@@ -74,6 +75,19 @@ public IEntityMNode getParent() {
     return parent.getAsEntityMNode();
   }
 
+  /**
+   * get MeasurementPath of this node
+   *
+   * @return MeasurementPath
+   */
+  @Override
+  public MeasurementPath getPartialPath() {
+    MeasurementPath result = new MeasurementPath(super.getPartialPath());
+    //    result.setMeasurementAlias(alias);

Review comment:
       remove




-- 
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] zyk990424 commented on a change in pull request #4268: [To new_vector] Add MeasurementPath and Refactor groupVectorPath

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



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/VectorPartialPath.java
##########
@@ -34,7 +39,11 @@
  */
 public class VectorPartialPath extends PartialPath {
 
+  // todo improve vector implementation by remove this placeholder
+  private static final String VECTOR_PLACEHOLDER = "";
+
   private List<String> subSensorsList;

Review comment:
       Fixed.

##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/VectorPartialPath.java
##########
@@ -34,7 +39,11 @@
  */
 public class VectorPartialPath extends PartialPath {

Review comment:
       Fixed.




-- 
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] zyk990424 commented on a change in pull request #4268: [To new_vector] Add MeasurementPath and Refactor groupVectorPath

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



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/mnode/MeasurementMNode.java
##########
@@ -74,6 +75,19 @@ public IEntityMNode getParent() {
     return parent.getAsEntityMNode();
   }
 
+  /**
+   * get MeasurementPath of this node
+   *
+   * @return MeasurementPath
+   */
+  @Override
+  public MeasurementPath getPartialPath() {
+    MeasurementPath result = new MeasurementPath(super.getPartialPath());
+    //    result.setMeasurementAlias(alias);

Review comment:
       Fixed.




-- 
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 #4268: [To new_vector] Add MeasurementPath and Refactor groupVectorPath

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



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/VectorPartialPath.java
##########
@@ -34,7 +39,11 @@
  */
 public class VectorPartialPath extends PartialPath {
 
+  // todo improve vector implementation by remove this placeholder
+  private static final String VECTOR_PLACEHOLDER = "";
+
   private List<String> subSensorsList;

Review comment:
       ```suggestion
     private List<String> measurementList;
   ```




-- 
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] zyk990424 commented on a change in pull request #4268: [To new_vector] Add MeasurementPath and Refactor groupVectorPath

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



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/VectorPartialPath.java
##########
@@ -111,6 +155,15 @@ public int hashCode() {
     return Objects.hash(super.hashCode(), subSensorsList);
   }
 
+  @Override
+  public PartialPath getExactPath() {

Review comment:
       If the partialPath is AlignedPath and it has only one measurement, return the measurement's PartialPath. Otherwise, return this partialPath. 




-- 
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] zyk990424 commented on a change in pull request #4268: [To new_vector] Add MeasurementPath and Refactor groupVectorPath

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



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/mnode/IMeasurementMNode.java
##########
@@ -29,6 +30,9 @@
   @Override
   IEntityMNode getParent();
 
+  @Override
+  MeasurementPath getPartialPath();

Review comment:
       Fixed.




-- 
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