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

morrysnow 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 80ff462abb2 [fix](Nereids) fix misunderstanding about 
bothSideShuffleKeysAreSameOrder (#34811)
80ff462abb2 is described below

commit 80ff462abb2dd090f873828318c8a1cc28b87eb2
Author: xzj7019 <[email protected]>
AuthorDate: Tue May 14 18:58:39 2024 +0800

    [fix](Nereids) fix misunderstanding about bothSideShuffleKeysAreSameOrder 
(#34811)
    
    fix misunderstanding about bothSideShuffleKeysAreSameOrder,
    which originally should ensure the order of shuffle column lists.
---
 .../nereids/properties/ChildrenPropertiesRegulator.java    | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java
index 31bef9b89d0..038e2646a6d 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/properties/ChildrenPropertiesRegulator.java
@@ -497,16 +497,10 @@ public class ChildrenPropertiesRegulator extends 
PlanVisitor<Boolean, Void> {
             boolean isSatisfy = true;
             for (int i = 0; i < shuffleSideOutputList.size() && isSatisfy; 
i++) {
                 ExprId shuffleSideExprId = shuffleSideOutputList.get(i);
-                boolean found = false;
-                for (int j = 0; j < notShuffleSideOutputList.size() && !found; 
j++) {
-                    ExprId notShuffleSideExprId = 
notShuffleSideOutputList.get(j);
-                    if (shuffleSideExprId.equals(notShuffleSideExprId)
-                            || 
shuffleSideOutput.getEquivalenceExprIdsOf(shuffleSideExprId)
-                            .contains(notShuffleSideExprId)) {
-                        found = true;
-                    }
-                }
-                if (!found) {
+                ExprId notShuffleSideExprId = notShuffleSideOutputList.get(i);
+                if (!(shuffleSideExprId.equals(notShuffleSideExprId)
+                        || 
shuffleSideOutput.getEquivalenceExprIdsOf(shuffleSideExprId)
+                        .contains(notShuffleSideExprId))) {
                     isSatisfy = false;
                 }
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to