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 581fffb76bd Add cached device number info for last query
581fffb76bd is described below
commit 581fffb76bdef8685c494344ed1d66cc4d9551eb
Author: shuwenwei <[email protected]>
AuthorDate: Thu Jun 5 09:24:31 2025 +0800
Add cached device number info for last query
---
.../operator/source/relational/LastQueryAggTableScanOperator.java | 3 +++
.../iotdb/db/queryengine/plan/planner/plan/node/PlanGraphPrinter.java | 1 +
2 files changed, 4 insertions(+)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/LastQueryAggTableScanOperator.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/LastQueryAggTableScanOperator.java
index 312294ff8b9..b078d7f2f34 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/LastQueryAggTableScanOperator.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/LastQueryAggTableScanOperator.java
@@ -26,6 +26,7 @@ import
org.apache.iotdb.db.queryengine.execution.operator.source.relational.aggr
import
org.apache.iotdb.db.queryengine.execution.operator.source.relational.aggregation.LastByDescAccumulator;
import
org.apache.iotdb.db.queryengine.execution.operator.source.relational.aggregation.LastDescAccumulator;
import
org.apache.iotdb.db.queryengine.execution.operator.source.relational.aggregation.TableAggregator;
+import org.apache.iotdb.db.queryengine.plan.planner.plan.node.PlanGraphPrinter;
import org.apache.iotdb.db.queryengine.plan.relational.metadata.ColumnSchema;
import org.apache.iotdb.db.queryengine.plan.relational.metadata.DeviceEntry;
import
org.apache.iotdb.db.queryengine.plan.relational.metadata.QualifiedObjectName;
@@ -96,6 +97,8 @@ public class LastQueryAggTableScanOperator extends
AbstractAggTableScanOperator
this.hitCachedResults = hitCachedResults;
this.dbName = qualifiedObjectName.getDatabaseName();
+ this.operatorContext.recordSpecifiedInfo(
+ PlanGraphPrinter.CACHED_DEVICE_NUMBER,
Integer.toString(cachedDeviceEntries.size()));
for (int i = 0; i < parameter.tableAggregators.size(); i++) {
if (parameter.tableAggregators.get(i).getAccumulator() instanceof
LastAccumulator) {
lastTimeAggregationIdx = i;
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/PlanGraphPrinter.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/PlanGraphPrinter.java
index 3188330fef4..eaf0d700ba6 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/PlanGraphPrinter.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/plan/node/PlanGraphPrinter.java
@@ -119,6 +119,7 @@ public class PlanGraphPrinter extends
PlanVisitor<List<String>, PlanGraphPrinter
private static final String REGION_NOT_ASSIGNED = "Not Assigned";
public static final String DEVICE_NUMBER = "DeviceNumber";
+ public static final String CACHED_DEVICE_NUMBER = "CachedDeviceNumber";
public static final String CURRENT_USED_MEMORY = "CurrentUsedMemory";
public static final String MAX_USED_MEMORY = "MaxUsedMemory";
public static final String MAX_RESERVED_MEMORY = "MaxReservedMemory";