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

xxyu pushed a commit to branch kylin5
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit 2e60700e52213661efe22020ceb76b7557ffd635
Author: Jiale He <jialeheb...@gmail.com>
AuthorDate: Fri Feb 24 11:51:13 2023 +0800

    KYLIN-5521 [FOLLOW UP] fix LeftOrInner Join & unstable UT
---
 .../main/java/org/apache/kylin/metadata/model/graph/JoinsGraph.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/src/core-metadata/src/main/java/org/apache/kylin/metadata/model/graph/JoinsGraph.java
 
b/src/core-metadata/src/main/java/org/apache/kylin/metadata/model/graph/JoinsGraph.java
index b6342fd476..2029fd61ac 100644
--- 
a/src/core-metadata/src/main/java/org/apache/kylin/metadata/model/graph/JoinsGraph.java
+++ 
b/src/core-metadata/src/main/java/org/apache/kylin/metadata/model/graph/JoinsGraph.java
@@ -349,13 +349,14 @@ public class JoinsGraph implements Serializable {
         for (Edge edge : edgeSet) {
             if (!edge.isLeftJoin() || edge.isLeftOrInnerJoin()) {
                 TableRef fkSide = edge.fkSide();
-                List<Edge> edgeList = inwardEdges(fkSide);
+                List<Edge> edgeList = inwardEdges(fkSide).stream().filter(e -> 
!e.isSwapJoin())
+                        .collect(Collectors.toList());
                 if (CollectionUtils.isEmpty(edgeList)) {
                     continue;
                 }
                 for (Edge targetEdge : edgeList) {
                     if (!edge.equals(targetEdge) && 
fkSide.equals(targetEdge.pkSide())
-                            && !targetEdge.isLeftOrInnerJoin() && 
targetEdge.isLeftJoin()) {
+                            && !targetEdge.isLeftOrInnerJoin()) {
                         setJoinToLeftOrInner(targetEdge.join);
                         normalize();
                     }

Reply via email to