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

jackietien pushed a commit to branch rel/1.2
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rel/1.2 by this push:
     new a17799b6feb [IOTDB-6134] Fill statement content in show queries for 
inner schema fetch
a17799b6feb is described below

commit a17799b6feb0a97b3917b1e7713e6455d215b656
Author: Jackie Tien <[email protected]>
AuthorDate: Fri Sep 1 08:40:00 2023 +0800

    [IOTDB-6134] Fill statement content in show queries for inner schema fetch
---
 .../plan/analyze/schema/ClusterSchemaFetchExecutor.java    | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java
index 01d4380f306..3bb32279e0a 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/analyze/schema/ClusterSchemaFetchExecutor.java
@@ -74,17 +74,21 @@ class ClusterSchemaFetchExecutor {
   }
 
   private ExecutionResult executionStatement(
-      Long queryId, Statement statement, MPPQueryContext context) {
+      long queryId, Statement statement, MPPQueryContext context) {
+
+    long timeout = context == null ? config.getQueryTimeoutThreshold() : 
context.getTimeOut();
+    String sql = context == null ? "" : "Fetch Schema for " + 
context.getQueryType();
+    if (context != null && context.getQueryType() == QueryType.READ) {
+      sql += ", " + context.getQueryId() + " : " + context.getSql();
+    }
     return coordinator.execute(
         statement,
         queryId,
         context == null ? null : context.getSession(),
-        "",
+        sql,
         ClusterPartitionFetcher.getInstance(),
         schemaFetcher,
-        context == null || context.getQueryType().equals(QueryType.WRITE)
-            ? config.getQueryTimeoutThreshold()
-            : context.getTimeOut());
+        timeout);
   }
 
   /**

Reply via email to