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

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


The following commit(s) were added to refs/heads/master by this push:
     new 10c24b8a4f5 Set correct operator type for LastQueryAggTableScanOperator
10c24b8a4f5 is described below

commit 10c24b8a4f566a5970d7b1af2bcf5765df0ac35d
Author: shuwenwei <[email protected]>
AuthorDate: Tue May 20 16:21:47 2025 +0800

    Set correct operator type for LastQueryAggTableScanOperator
---
 .../iotdb/db/queryengine/execution/operator/OperatorContext.java    | 6 +++++-
 .../operator/source/relational/AbstractAggTableScanOperator.java    | 4 ++++
 .../iotdb/db/queryengine/plan/planner/TableOperatorGenerator.java   | 3 +++
 3 files changed, 12 insertions(+), 1 deletion(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/OperatorContext.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/OperatorContext.java
index 99eccdcef3d..beb25030400 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/OperatorContext.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/OperatorContext.java
@@ -55,7 +55,7 @@ public class OperatorContext implements Accountable {
   private final int operatorId;
   // It seems it's never used.
   private final PlanNodeId planNodeId;
-  private final String operatorType;
+  private String operatorType;
   private DriverContext driverContext;
 
   private long totalExecutionTimeInNanos = 0L;
@@ -96,6 +96,10 @@ public class OperatorContext implements Accountable {
     return operatorType;
   }
 
+  public void setOperatorType(String operatorType) {
+    this.operatorType = operatorType;
+  }
+
   public DriverContext getDriverContext() {
     return driverContext;
   }
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractAggTableScanOperator.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractAggTableScanOperator.java
index 52d829f7cf6..8570817ce7c 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractAggTableScanOperator.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractAggTableScanOperator.java
@@ -822,6 +822,10 @@ public abstract class AbstractAggTableScanOperator extends 
AbstractDataSourceOpe
       this.timeColumnName = timeColumnName;
     }
 
+    public OperatorContext getOperatorContext() {
+      return context;
+    }
+
     public List<TableAggregator> getTableAggregators() {
       return tableAggregators;
     }
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/TableOperatorGenerator.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/TableOperatorGenerator.java
index 3ad31ab62a2..30087ebfbdc 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/TableOperatorGenerator.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/TableOperatorGenerator.java
@@ -2972,6 +2972,9 @@ public class TableOperatorGenerator extends 
PlanVisitor<Operator, LocalExecution
             hitCachedResults);
 
     ((DataDriverContext) 
context.getDriverContext()).addSourceOperator(lastQueryOperator);
+    parameter
+        .getOperatorContext()
+        .setOperatorType(LastQueryAggTableScanOperator.class.getSimpleName());
     return lastQueryOperator;
   }
 

Reply via email to