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/10/09 01:03:48 UTC

[GitHub] [iotdb] MarcosZyk commented on a diff in pull request #6661: [IOTDB-3784] tag aggregation: basic support

MarcosZyk commented on code in PR #6661:
URL: https://github.com/apache/iotdb/pull/6661#discussion_r990714507


##########
server/src/main/java/org/apache/iotdb/db/metadata/mtree/MTreeBelowSGCachedImpl.java:
##########
@@ -670,6 +674,13 @@ protected void collectMeasurement(IMeasurementMNode node) {
               // only when user query with alias, the alias in path will be set
               path.setMeasurementAlias(node.getAlias());
             }
+            if (withTags) {
+              try {
+                path.setTagMap(tagManager.readTagFile(node.getOffset()).getLeft());
+              } catch (IOException e) {
+                throw new RuntimeException(e);
+              }
+            }
             result.add(path);

Review Comment:
   I think the ```MTree``` shall not dependent on the ```TagManager```. What about passing a ```Function``` or ```Consumer```, the implementation of which is to load tag info into measurementPath, into this method to decouple ```MTree``` with ```TagManager```.



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