alpass163 commented on code in PR #18874:
URL: https://github.com/apache/iotdb/pull/18874#discussion_r4311475800


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/table/DataNodeTableCache.java:
##########
@@ -370,6 +419,60 @@ public void commitUpdateTable(
     }
   }
 
+  /**
+   * Applies the effect of a committed change on the tree-to-table view index. 
Every attribute the
+   * operation needs comes with the request: the table this DataNode caches 
may be a placeholder, so
+   * the entry cannot be computed from it.
+   */
+  private void operateOnTree2TableViewCache(
+      String database,
+      String tableName,
+      @Nullable String oldTableName,
+      TUpdateTree2TableView updateTree2TableViewInfo) {
+    if (Objects.isNull(updateTree2TableViewInfo)) {
+      return;
+    }
+    final TreeToTableViewOperationType type =
+        
TreeToTableViewOperationType.getType(updateTree2TableViewInfo.getTree2TableOperationType());
+    try {
+      switch (type) {
+        case REMOVE:
+          // Unregistering a view needs nothing but its name.
+          treeToTableViewCache.removeView(database, tableName);

Review Comment:
   fixed 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to