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 edb17197ccd Support prefix path 'root.**' in tree view scan
edb17197ccd is described below
commit edb17197ccd26fcb5659798c153a3e56ce0bdadf
Author: shuwenwei <[email protected]>
AuthorDate: Wed Aug 20 10:37:08 2025 +0800
Support prefix path 'root.**' in tree view scan
---
.../iotdb/db/queryengine/plan/planner/TableOperatorGenerator.java | 5 ++++-
.../db/queryengine/plan/relational/planner/TableLogicalPlanner.java | 5 ++++-
.../relational/planner/optimizations/PushPredicateIntoTableScan.java | 5 ++++-
3 files changed, 12 insertions(+), 3 deletions(-)
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 a27d28d0f30..475732a6af5 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
@@ -1028,7 +1028,10 @@ public class TableOperatorGenerator extends
PlanVisitor<Operator, LocalExecution
try {
PartialPath db = new PartialPath(treeDBName);
int dbLevel = db.getNodes().length;
- if (dbLevel == 2) {
+ // For the path of 'root.**', we can only get the root level in this
place
+ // In this case, we still need to support deviceId such as 'root.db'
+ // The relevant deviceId must be two level db, but we can't get it now
+ if (dbLevel == 1 || dbLevel == 2) {
return new TwoLevelDBExtractor(treeDBName.length());
} else if (dbLevel == 3) {
return new ThreeLevelDBExtractor(treeDBName.length());
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TableLogicalPlanner.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TableLogicalPlanner.java
index 0a5aed8d721..456e4b768d8 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TableLogicalPlanner.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/TableLogicalPlanner.java
@@ -582,7 +582,10 @@ public class TableLogicalPlanner {
ClusterPartitionFetcher.getInstance().getSchemaPartition(tree));
if (analysis.getSchemaPartitionInfo().getSchemaPartitionMap().size() >
1) {
- throw new SemanticException("Tree device view with multiple databases
is unsupported yet.");
+ throw new SemanticException(
+ "Tree device view with multiple databases("
+ +
analysis.getSchemaPartitionInfo().getSchemaPartitionMap().keySet()
+ + ") is unsupported yet.");
}
} else {
analysis.setSchemaPartitionInfo(
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java
index cfaa4a99f84..8585eb4ebcb 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/optimizations/PushPredicateIntoTableScan.java
@@ -580,7 +580,10 @@ public class PushPredicateIntoTableScan implements
PlanOptimizer {
attributeColumns,
queryContext);
if (deviceEntriesMap.size() > 1) {
- throw new SemanticException("Tree device view with multiple databases
is unsupported yet.");
+ throw new SemanticException(
+ "Tree device view with multiple databases("
+ + deviceEntriesMap.keySet()
+ + ") is unsupported yet.");
}
final String deviceDatabase =
!deviceEntriesMap.isEmpty() ?
deviceEntriesMap.keySet().iterator().next() : null;