Caideyipi commented on code in PR #16531:
URL: https://github.com/apache/iotdb/pull/16531#discussion_r2596967049


##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/pipe/source/IoTDBConfigRegionSource.java:
##########
@@ -223,15 +246,20 @@ protected Optional<PipeWritePlanEvent> 
trimRealtimeEventByPrivilege(
     final ConfigPhysicalPlan plan =
         ((PipeConfigRegionWritePlanEvent) event).getConfigPhysicalPlan();
     final Boolean isTableDatabasePlan = isTableDatabasePlan(plan);
-    if (Boolean.FALSE.equals(isTableDatabasePlan)) {
-      return Optional.of(event);
+    if (!Boolean.TRUE.equals(isTableDatabasePlan)) {
+      final Optional<ConfigPhysicalPlan> result = 
treePrivilegeParseVisitor.process(plan, userName);
+      if (result.isPresent()) {
+        return Optional.of(
+            new PipeConfigRegionWritePlanEvent(result.get(), 
event.isGeneratedByPipe()));
+      }
     }
-
-    final Optional<ConfigPhysicalPlan> result =
-        TABLE_PRIVILEGE_PARSE_VISITOR.process(plan, userName);
-    if (result.isPresent()) {
-      return Optional.of(
-          new PipeConfigRegionWritePlanEvent(result.get(), 
event.isGeneratedByPipe()));
+    if (!Boolean.FALSE.equals(isTableDatabasePlan)) {

Review Comment:
   Here I just want to keep the 2 "VISITOR"s appear once each. If "null" is 
processed first the visitors may appear twice.



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