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 2022/07/29 06:13:15 UTC
[doris] branch master updated: [Bug] (outer join) Fix wrong types in outer join (#11315)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new d13406d59e [Bug] (outer join) Fix wrong types in outer join (#11315)
d13406d59e is described below
commit d13406d59ee610da599cee81551daf6760c08e2f
Author: Gabriel <ga...@gmail.com>
AuthorDate: Fri Jul 29 14:13:09 2022 +0800
[Bug] (outer join) Fix wrong types in outer join (#11315)
---
.../main/java/org/apache/doris/analysis/ExprSubstitutionMap.java | 6 +++++-
fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java | 3 ++-
2 files changed, 7 insertions(+), 2 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 42c52ea095..40c44b5bd0 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
@@ -249,7 +249,11 @@ public final class ExprSubstitutionMap {
}
public void substituteLhs(ExprSubstitutionMap lhsSmap, Analyzer analyzer) {
- lhs = Expr.substituteList(lhs, lhsSmap, analyzer, false);
+ substituteLhs(lhsSmap, analyzer, false);
+ }
+
+ public void substituteLhs(ExprSubstitutionMap lhsSmap, Analyzer analyzer, boolean preserveRootTypes) {
+ lhs = Expr.substituteList(lhs, lhsSmap, analyzer, preserveRootTypes);
}
public List<Expr> getLhs() {
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 bd7db83860..6f1fb8172a 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
@@ -626,7 +626,8 @@ public class HashJoinNode extends PlanNode {
vIntermediateRightTupleDesc.computeMemLayout();
// 3. replace srcExpr by intermediate tuple
Preconditions.checkState(vSrcToOutputSMap != null);
- vSrcToOutputSMap.substituteLhs(originToIntermediateSmap, analyzer);
+ // Set `preserveRootTypes` to true because we should keep the consistent for types. See Issue-11314.
+ vSrcToOutputSMap.substituteLhs(originToIntermediateSmap, analyzer, true);
// 4. replace other conjuncts and conjuncts
otherJoinConjuncts = Expr.substituteList(otherJoinConjuncts, originToIntermediateSmap, analyzer, false);
if (votherJoinConjunct != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org