You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2023/06/27 03:11:27 UTC

[doris] branch branch-1.2-lts updated: [fix](planner)scan node's smap should use materiazlied slots and project list as left and right expr list (#21218)

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

yiguolei pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new 89b3736964 [fix](planner)scan node's smap should use materiazlied slots and project list as left and right expr list (#21218)
89b3736964 is described below

commit 89b3736964835c7da7733c6a5772db76ea010463
Author: starocean999 <40...@users.noreply.github.com>
AuthorDate: Tue Jun 27 11:11:20 2023 +0800

    [fix](planner)scan node's smap should use materiazlied slots and project list as left and right expr list (#21218)
---
 fe/fe-core/src/main/java/org/apache/doris/planner/ScanNode.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/ScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/ScanNode.java
index 9cf58588bb..fdf04a93e5 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/ScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/ScanNode.java
@@ -496,8 +496,11 @@ public abstract class ScanNode extends PlanNode {
             // this happens if the olap table is in the most inner sub-query block in the cascades sub-queries
             // create a tmpSmap for the later setOutputSmap call
             ExprSubstitutionMap tmpSmap = new ExprSubstitutionMap(
-                    Lists.newArrayList(outputTupleDesc.getSlots().stream().map(slot -> new SlotRef(slot)).collect(
-                    Collectors.toList())), Lists.newArrayList(projectList));
+                    Lists.newArrayList(outputTupleDesc.getSlots().stream()
+                            .filter(slot -> slot.isMaterialized())
+                            .map(slot -> new SlotRef(slot))
+                            .collect(Collectors.toList())),
+                    Lists.newArrayList(projectList));
             Set<SlotId> allOutputSlotIds = outputTupleDesc.getSlots().stream().map(slot -> slot.getId())
                     .collect(Collectors.toSet());
             List<Expr> newRhs = Lists.newArrayList();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org