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

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


The following commit(s) were added to refs/heads/fixFetchDeviceNotInCache by 
this push:
     new 5e833701065 remove debug code
5e833701065 is described below

commit 5e833701065535e1cc2e202e8a0f014ca1e76a89
Author: shuwenwei <s13979062...@gmail.com>
AuthorDate: Mon Jul 14 17:19:52 2025 +0800

    remove debug code
---
 .../operator/source/relational/DeviceIteratorScanOperator.java         | 3 ++-
 .../plan/relational/metadata/fetcher/TableDeviceSchemaFetcher.java     | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/DeviceIteratorScanOperator.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/DeviceIteratorScanOperator.java
index f088e448fd7..1689fd2fd84 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/DeviceIteratorScanOperator.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/DeviceIteratorScanOperator.java
@@ -34,6 +34,7 @@ import org.apache.tsfile.utils.RamUsageEstimator;
 import org.apache.tsfile.write.schema.IMeasurementSchema;
 
 import java.util.List;
+import java.util.NoSuchElementException;
 import java.util.Set;
 
 public class DeviceIteratorScanOperator extends AbstractDataSourceOperator {
@@ -133,7 +134,7 @@ public class DeviceIteratorScanOperator extends 
AbstractDataSourceOperator {
   @Override
   public TsBlock next() throws Exception {
     if (!hasNext()) {
-      return null;
+      throw new NoSuchElementException();
     }
     if (!currentDeviceInit) {
       return null;
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaFetcher.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaFetcher.java
index d5672db3e31..2b4509aa1e9 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaFetcher.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/metadata/fetcher/TableDeviceSchemaFetcher.java
@@ -573,7 +573,7 @@ public class TableDeviceSchemaFetcher {
       deviceEntryList.add(deviceEntry);
       // Only cache those exact device query
       // Fetch paths is null iff there are fuzzy queries related to id columns
-      if (false && Objects.nonNull(statement.getPartitionKeyList())) {
+      if (Objects.nonNull(statement.getPartitionKeyList())) {
         cache.putAttributes(statement.getDatabase(), deviceID, attributeMap);
       }
     }

Reply via email to