You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by li...@apache.org on 2022/07/07 15:01:46 UTC

[doris] branch dev-1.0.1-v20220707 updated (519dba0d10 -> 8190c78e53)

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

lingmiao pushed a change to branch dev-1.0.1-v20220707
in repository https://gitbox.apache.org/repos/asf/doris.git


 discard 519dba0d10 [tmpfix] runtime filter and slot id
     new 8190c78e53 [tmpfix] runtime filter and slot id

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (519dba0d10)
            \
             N -- N -- N   refs/heads/dev-1.0.1-v20220707 (8190c78e53)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java  | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)


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


[doris] 01/01: [tmpfix] runtime filter and slot id

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lingmiao pushed a commit to branch dev-1.0.1-v20220707
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 8190c78e53c2a6b0d548fbc7040755811add09ad
Author: EmmyMiao87 <52...@qq.com>
AuthorDate: Thu Jul 7 22:59:54 2022 +0800

    [tmpfix] runtime filter and slot id
---
 .../java/org/apache/doris/analysis/ExprSubstitutionMap.java | 13 +++++++++++--
 .../main/java/org/apache/doris/planner/HashJoinNode.java    |  5 ++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java
index d352d7608a..8a2f6d0b9b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/ExprSubstitutionMap.java
@@ -171,7 +171,9 @@ public final class ExprSubstitutionMap {
         for (int i = 0; i < g.size(); i++) {
             if (f.containsMappingFor(g.lhs_.get(i))) {
                 result.put(f.get(g.lhs_.get(i)), g.rhs_.get(i));
-                analyzer.putEquivalentSlot(((SlotRef) Objects.requireNonNull(f.get(g.lhs_.get(i)))).getSlotId(), ((SlotRef) g.lhs_.get(i)).getSlotId());
+                if (f.get(g.lhs_.get(i)) instanceof SlotRef && g.lhs_.get(i) instanceof SlotRef) {
+                    analyzer.putEquivalentSlot(((SlotRef) Objects.requireNonNull(f.get(g.lhs_.get(i)))).getSlotId(), ((SlotRef) g.lhs_.get(i)).getSlotId());
+                }
             } else {
                 result.put(g.lhs_.get(i), g.rhs_.get(i));
             }
@@ -184,7 +186,7 @@ public final class ExprSubstitutionMap {
      * f [A.id, B.id] [A.name, B.name] g [A.id, C.id] [A.age, C.age]
      * return: [A.id, C,id] [A.name, B.name] [A.age, C.age]
      */
-    public static ExprSubstitutionMap combineAndReplace(ExprSubstitutionMap f, ExprSubstitutionMap g) {
+    public static ExprSubstitutionMap composeAndReplace(ExprSubstitutionMap f, ExprSubstitutionMap g) {
         if (f == null && g == null) {
             return new ExprSubstitutionMap();
         }
@@ -196,6 +198,13 @@ public final class ExprSubstitutionMap {
         }
         ExprSubstitutionMap result = new ExprSubstitutionMap();
         result = ExprSubstitutionMap.combine(result, g);
+        for (int i = 0; i < g.size(); i++) {
+            // case a->b, b->c => a->c
+            if (f.mappingForRhsExpr(g.getLhs().get(i)) != null) {
+                result.getLhs().set(i, f.mappingForRhsExpr(g.getLhs().get(i)));
+            }
+        }
+        // add remaining f
         for (int i = 0; i < f.size(); i++) {
             if (!result.containsMappingFor(f.lhs_.get(i))) {
                 result.put(f.lhs_.get(i), f.rhs_.get(i));
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
index 6deb20d619..16e82b644f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
@@ -441,7 +441,7 @@ public class HashJoinNode extends PlanNode {
             }
         }
         // 4. change the outputSmap
-        outputSmap = ExprSubstitutionMap.combineAndReplace(outputSmap, srcTblRefToOutputTupleSmap);
+        outputSmap = ExprSubstitutionMap.composeAndReplace(outputSmap, srcTblRefToOutputTupleSmap);
     }
 
     private void replaceOutputSmapForOuterJoin() {
@@ -989,6 +989,9 @@ public class HashJoinNode extends PlanNode {
 
     @Override
     public ArrayList<TupleId> getOutputTblRefIds() {
+        if (vOutputTupleDesc != null) {
+            return Lists.newArrayList(vOutputTupleDesc.getId());
+        }
         switch (joinOp) {
             case LEFT_SEMI_JOIN:
             case LEFT_ANTI_JOIN:


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