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 2022/03/21 09:28:30 UTC

[GitHub] [iotdb] MarcosZyk commented on a change in pull request #5271: [To rel/0.13][IOTDB-2759]Complete result of show template using or set on template

MarcosZyk commented on a change in pull request #5271:
URL: https://github.com/apache/iotdb/pull/5271#discussion_r830898715



##########
File path: server/src/main/java/org/apache/iotdb/db/metadata/mtree/MTree.java
##########
@@ -1767,6 +1767,13 @@ public int getMountedNodeIndexOnMeasurementPath(PartialPath measurementPath)
             : template.getRelatedStorageGroup();
     List<String> resSet = new ArrayList<>();
     for (PartialPath sgPath : initPath) {
+      // before Traverser refactored as 0.14, need check storage group alone
+      if (getNodeByPath(sgPath).getSchemaTemplate() != null) {
+        if (templateName.equals(ONE_LEVEL_PATH_WILDCARD)
+            || templateName.equals(getNodeByPath(sgPath).getSchemaTemplate().getName())) {
+          resSet.add(sgPath.getFullPath());
+        }
+      }

Review comment:
       According to this scenario, if you want to include the sg node, it is better to use ```traverser.setPrefixMatch(true)``` .




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