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

xingtanzjr pushed a commit to branch xingtanzjr/query_retry
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/xingtanzjr/query_retry by this 
push:
     new 716b0bff96 fix the bug that statement has been changed after Analyze
716b0bff96 is described below

commit 716b0bff96f96b9810a729077a831b499843a1d4
Author: Jinrui.Zhang <[email protected]>
AuthorDate: Thu Jul 14 11:35:31 2022 +0800

    fix the bug that statement has been changed after Analyze
---
 .../java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
index 75ea799ac5..a503a92999 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
@@ -95,6 +95,7 @@ public class QueryExecution implements IQueryExecution {
 
   private final List<PlanOptimizer> planOptimizers;
 
+  private Statement rawStatement;
   private Analysis analysis;
   private LogicalQueryPlan logicalPlan;
   private DistributedQueryPlan distributedPlan;
@@ -123,6 +124,7 @@ public class QueryExecution implements IQueryExecution {
       IPartitionFetcher partitionFetcher,
       ISchemaFetcher schemaFetcher,
       IClientManager<TEndPoint, SyncDataNodeInternalServiceClient> 
internalServiceClientManager) {
+    this.rawStatement = statement;
     this.executor = executor;
     this.writeOperationExecutor = writeOperationExecutor;
     this.scheduledExecutor = scheduledExecutor;
@@ -188,7 +190,7 @@ public class QueryExecution implements IQueryExecution {
     // force invalid PartitionCache
     partitionFetcher.invalidAllCache();
     // re-analyze the query
-    this.analysis = analyze(this.analysis.getStatement(), context, 
partitionFetcher, schemaFetcher);
+    this.analysis = analyze(rawStatement, context, partitionFetcher, 
schemaFetcher);
     // re-start the QueryExecution
     this.start();
   }

Reply via email to