This is an automated email from the ASF dual-hosted git repository.

HTHou pushed a commit to branch codex/fix-rest-table-metric-type
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 6d05d1f3b756c37128c97b135e01ca4245f41f23
Author: HTHou <[email protected]>
AuthorDate: Mon May 25 14:51:36 2026 +0800

    Fix REST table metric statement type labels
---
 .../iotdb/rest/protocol/table/v1/impl/RestApiServiceImpl.java    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git 
a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/impl/RestApiServiceImpl.java
 
b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/impl/RestApiServiceImpl.java
index 2d0a363c339..a2d4a84cb55 100644
--- 
a/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/impl/RestApiServiceImpl.java
+++ 
b/external-service-impl/rest/src/main/java/org/apache/iotdb/rest/protocol/table/v1/impl/RestApiServiceImpl.java
@@ -34,6 +34,7 @@ import 
org.apache.iotdb.db.queryengine.plan.planner.LocalExecutionPlanner;
 import org.apache.iotdb.db.queryengine.plan.relational.metadata.Metadata;
 import org.apache.iotdb.db.queryengine.plan.relational.sql.ast.Insert;
 import org.apache.iotdb.db.queryengine.plan.relational.sql.parser.SqlParser;
+import org.apache.iotdb.db.queryengine.plan.statement.StatementType;
 import 
org.apache.iotdb.db.queryengine.plan.statement.crud.InsertTabletStatement;
 import org.apache.iotdb.db.utils.CommonUtils;
 import org.apache.iotdb.db.utils.SetThreadName;
@@ -139,7 +140,7 @@ public class RestApiServiceImpl extends RestApiService {
           .ifPresent(
               s ->
                   CommonUtils.addStatementExecutionLatency(
-                      OperationType.EXECUTE_QUERY_STATEMENT, s.toString(), 
costTime));
+                      OperationType.EXECUTE_QUERY_STATEMENT, 
StatementType.QUERY.name(), costTime));
     }
   }
 
@@ -238,7 +239,11 @@ public class RestApiServiceImpl extends RestApiService {
           .ifPresent(
               s ->
                   CommonUtils.addStatementExecutionLatency(
-                      OperationType.EXECUTE_NON_QUERY_PLAN, s.toString(), 
costTime));
+                      OperationType.EXECUTE_NON_QUERY_PLAN,
+                      s instanceof Insert
+                          ? StatementType.INSERT.name()
+                          : s.getClass().getSimpleName(),
+                      costTime));
       if (queryId != null) {
         COORDINATOR.cleanupQueryExecution(queryId);
       }

Reply via email to