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

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

commit 57040775c538999897b371e58ad283e431cf3f1e
Merge: 2d6860495bc 5ebbb8da6a0
Author: JackieTien97 <[email protected]>
AuthorDate: Thu Jan 2 17:22:31 2025 +0800

    Merge remote-tracking branch 'origin/master' into TreeToTableView

 .../iterative/rule/PruneTableScanColumns.java       | 13 ++++---------
 .../db/storageengine/load/LoadTsFileManager.java    |  1 -
 .../plan/relational/analyzer/ShowQueriesTest.java   | 21 +++++++++++++++++++++
 3 files changed, 25 insertions(+), 10 deletions(-)

diff --cc 
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PruneTableScanColumns.java
index 2b2a4afb411,c9c577300e6..f311c5c2709
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PruneTableScanColumns.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/relational/planner/iterative/rule/PruneTableScanColumns.java
@@@ -88,53 -87,25 +88,48 @@@ public class PruneTableScanColumns exte
                        .forEach(
                            symbol -> newAssignments.put(symbol, 
node.getAssignments().get(symbol))));
  
 -      return Optional.of(
 -          new DeviceTableScanNode(
 -              deviceTableScanNode.getPlanNodeId(),
 -              deviceTableScanNode.getQualifiedObjectName(),
 -              newOutputs,
 -              newAssignments,
 -              deviceTableScanNode.getDeviceEntries(),
 -              deviceTableScanNode.getIdAndAttributeIndexMap(),
 -              deviceTableScanNode.getScanOrder(),
 -              deviceTableScanNode.getTimePredicate().orElse(null),
 -              deviceTableScanNode.getPushDownPredicate(),
 -              deviceTableScanNode.getPushDownLimit(),
 -              deviceTableScanNode.getPushDownOffset(),
 -              deviceTableScanNode.isPushLimitToEachDevice()));
 +      if (node instanceof TreeDeviceViewScanNode) {
 +        TreeDeviceViewScanNode treeDeviceViewScanNode =
 +            (TreeDeviceViewScanNode) deviceTableScanNode;
 +        return Optional.of(
 +            new TreeDeviceViewScanNode(
 +                deviceTableScanNode.getPlanNodeId(),
 +                deviceTableScanNode.getQualifiedObjectName(),
 +                newOutputs,
 +                newAssignments,
 +                deviceTableScanNode.getDeviceEntries(),
 +                deviceTableScanNode.getIdAndAttributeIndexMap(),
 +                deviceTableScanNode.getScanOrder(),
 +                deviceTableScanNode.getTimePredicate().orElse(null),
 +                deviceTableScanNode.getPushDownPredicate(),
 +                deviceTableScanNode.getPushDownLimit(),
 +                deviceTableScanNode.getPushDownOffset(),
 +                deviceTableScanNode.isPushLimitToEachDevice(),
 +                deviceTableScanNode.containsNonAlignedDevice(),
 +                treeDeviceViewScanNode.getTreeDBName(),
 +                treeDeviceViewScanNode.getMeasurementColumnNameMap()));
 +      } else {
 +        return Optional.of(
 +            new DeviceTableScanNode(
 +                deviceTableScanNode.getPlanNodeId(),
 +                deviceTableScanNode.getQualifiedObjectName(),
 +                newOutputs,
 +                newAssignments,
 +                deviceTableScanNode.getDeviceEntries(),
 +                deviceTableScanNode.getIdAndAttributeIndexMap(),
 +                deviceTableScanNode.getScanOrder(),
 +                deviceTableScanNode.getTimePredicate().orElse(null),
 +                deviceTableScanNode.getPushDownPredicate(),
 +                deviceTableScanNode.getPushDownLimit(),
 +                deviceTableScanNode.getPushDownOffset(),
 +                deviceTableScanNode.isPushLimitToEachDevice(),
 +                deviceTableScanNode.containsNonAlignedDevice()));
 +      }
      } else if (node instanceof InformationSchemaTableScanNode) {
-       return Optional.of(
-           new InformationSchemaTableScanNode(
-               node.getPlanNodeId(),
-               node.getQualifiedObjectName(),
-               newOutputs,
-               newAssignments,
-               node.getPushDownPredicate(),
-               node.getPushDownLimit(),
-               node.getPushDownOffset()));
+       // For the convenience of process in execution stage, column-prune for
+       // InformationSchemaTableScanNode is
+       // not supported now.
+       return Optional.empty();
      } else {
        throw new UnsupportedOperationException(
            "Unknown TableScanNode type: " + node.getClass().getSimpleName());

Reply via email to