This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch memoryEstimateRefine
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/memoryEstimateRefine by this
push:
new c1cd50a1eec use allSensors instead of new added field
c1cd50a1eec is described below
commit c1cd50a1eecbb5ce7ad199eb122183bb2fbaf92e
Author: JackieTien97 <[email protected]>
AuthorDate: Sat Feb 28 14:59:45 2026 +0800
use allSensors instead of new added field
---
.../source/relational/AbstractTableScanOperator.java | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractTableScanOperator.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractTableScanOperator.java
index 86dba541b9a..fa6a7093b58 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractTableScanOperator.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/AbstractTableScanOperator.java
@@ -20,7 +20,6 @@
package org.apache.iotdb.db.queryengine.execution.operator.source.relational;
import org.apache.iotdb.commons.path.AlignedFullPath;
-import org.apache.iotdb.commons.schema.table.column.TsTableColumnCategory;
import org.apache.iotdb.db.queryengine.execution.MemoryEstimationHelper;
import org.apache.iotdb.db.queryengine.execution.operator.OperatorContext;
import
org.apache.iotdb.db.queryengine.execution.operator.source.AbstractSeriesScanOperator;
@@ -91,8 +90,6 @@ public abstract class AbstractTableScanOperator extends
AbstractSeriesScanOperat
private int currentDeviceIndex;
- protected final int maxPeekMemoryTimeAndFieldColumnCount;
-
public AbstractTableScanOperator(AbstractTableScanOperatorParameter
parameter) {
this.sourceId = parameter.sourceId;
this.operatorContext = parameter.context;
@@ -114,20 +111,11 @@ public abstract class AbstractTableScanOperator extends
AbstractSeriesScanOperat
this.currentDeviceIndex = 0;
this.operatorContext.recordSpecifiedInfo(CURRENT_DEVICE_INDEX_STRING,
Integer.toString(0));
- int timeAndFieldColumnCount = 0;
- for (ColumnSchema columnSchema : parameter.columnSchemas) {
- if (columnSchema.getColumnCategory() == TsTableColumnCategory.TIME
- || columnSchema.getColumnCategory() == TsTableColumnCategory.FIELD) {
- timeAndFieldColumnCount++;
- }
- }
- this.maxPeekMemoryTimeAndFieldColumnCount = timeAndFieldColumnCount;
-
+ // allSensors include time and all field columns
this.maxReturnSize =
Math.min(
maxReturnSize,
- (1L + timeAndFieldColumnCount)
- *
TSFileDescriptor.getInstance().getConfig().getPageSizeInByte());
+ allSensors.size() *
TSFileDescriptor.getInstance().getConfig().getPageSizeInByte());
this.maxTsBlockLineNum = parameter.maxTsBlockLineNum;
constructAlignedSeriesScanUtil();
@@ -240,10 +228,10 @@ public abstract class AbstractTableScanOperator extends
AbstractSeriesScanOperat
@Override
public long calculateMaxPeekMemory() {
+ // allSensors have included time column and all field columns
return Math.max(
maxReturnSize,
- (1L + maxPeekMemoryTimeAndFieldColumnCount)
- * TSFileDescriptor.getInstance().getConfig().getPageSizeInByte());
+ allSensors.size() *
TSFileDescriptor.getInstance().getConfig().getPageSizeInByte());
}
@Override