You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2023/01/01 18:10:03 UTC

[GitHub] [doris] morrySnow commented on a diff in pull request #15479: [fix](Nereids): generate colocate join when property is different with require property

morrySnow commented on code in PR #15479:
URL: https://github.com/apache/doris/pull/15479#discussion_r1059781227


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/properties/DistributionSpecHash.java:
##########
@@ -174,7 +182,13 @@ public boolean satisfy(DistributionSpec required) {
             return containsSatisfy(requiredHash.getOrderedShuffledColumns());
         }
 
-        if (requiredHash.shuffleType == ShuffleType.NATURAL && this.shuffleType != ShuffleType.NATURAL) {
+        // when this shuffle type is natural, we allow contains satisfied for possible colocate-join
+        if (this.shuffleType == ShuffleType.NATURAL) {

Review Comment:
   how can we handle left output's type is BUCKETED with possible bucket shuffle join?
   If we need equalsSatisfy for BUCKETED type. the left hand may has been add Distribute on it, and has no chance to change to bucket join, am i right?



##########
fe/fe-core/src/test/java/org/apache/doris/nereids/rules/mv/SelectMvIndexTest.java:
##########
@@ -760,7 +760,7 @@ public void testBitmapUnionInSubquery() throws Exception {
         createMv(createUserTagMVSql);
         String query = "select user_id from " + USER_TAG_TABLE_NAME + " where user_id in (select user_id from "
                 + USER_TAG_TABLE_NAME + " group by user_id having bitmap_union_count(to_bitmap(tag_id)) >1 ) ;";
-        testMvWithTwoTable(query, "user_tags", "user_tags_mv");
+        testMvWithTwoTable(query, "user_tags_mv", "user_tags");

Review Comment:
   why swap them?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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