shuwenwei commented on code in PR #14617:
URL: https://github.com/apache/iotdb/pull/14617#discussion_r2048506346


##########
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/rest/v1/impl/RestApiServiceImpl.java:
##########
@@ -102,21 +105,36 @@ public Response executeNonQueryStatement(SQL sql, 
SecurityContext securityContex
             .build();
       }
 
-      Response response = authorizationHandler.checkAuthority(securityContext, 
statement);
-      if (response != null) {
-        return response;
-      }
+      final ExecutionResult result;
       queryId = SESSION_MANAGER.requestQueryId();
-      ExecutionResult result =
-          COORDINATOR.executeForTreeModel(
-              statement,
-              queryId,
-              SESSION_MANAGER.getSessionInfo(SESSION_MANAGER.getCurrSession()),
-              sql.getSql(),
-              partitionFetcher,
-              schemaFetcher,
-              config.getQueryTimeoutThreshold(),
-              false);
+      if (statement instanceof CreateTableViewStatement) {
+        result =
+            COORDINATOR.executeForTableModel(
+                ((CreateTableViewStatement) statement).getCreateTableView(),
+                new SqlParser(),
+                SESSION_MANAGER.getCurrSessionAndUpdateIdleTime(),
+                queryId,
+                
SESSION_MANAGER.getSessionInfo(SESSION_MANAGER.getCurrSession()),
+                sql.getSql(),
+                LocalExecutionPlanner.getInstance().metadata,
+                config.getQueryTimeoutThreshold(),
+                false);
+      } else {
+        Response response = 
authorizationHandler.checkAuthority(securityContext, statement);

Review Comment:
   Does CreateTableViewStatement need to do this check?



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