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 2021/07/07 06:48:54 UTC

[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #6172: [Bug] Fix the bug of bucket shuffle join cause error paln

EmmyMiao87 commented on a change in pull request #6172:
URL: https://github.com/apache/incubator-doris/pull/6172#discussion_r665089544



##########
File path: fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java
##########
@@ -683,9 +678,14 @@ private boolean canBucketShuffleJoin(HashJoinNode node, PlanNode leftRoot,
         DistributionInfo leftDistribution = leftScanNode.getOlapTable().getDefaultDistributionInfo();
 
         if (leftDistribution instanceof HashDistributionInfo) {
+            // use the table_name + '-' + column_name as check condition
             List<Column> leftDistributeColumns = ((HashDistributionInfo) leftDistribution).getDistributionColumns();
+            List<String> leftDistributeColumnNames = Lists.newArrayList();
+            for (Column col : leftDistributeColumns) {
+                leftDistributeColumnNames.add(leftTable.getName() + "-" + col.getName());

Review comment:
       used to "."

##########
File path: fe/fe-core/src/main/java/org/apache/doris/planner/DistributedPlanner.java
##########
@@ -696,18 +696,21 @@ private boolean canBucketShuffleJoin(HashJoinNode node, PlanNode leftRoot,
                     continue;
                 }
 
-                SlotDescriptor leftSlot = lhsJoinExpr.unwrapSlotRef().getDesc();
-
-                leftJoinColumns.add(leftSlot.getColumn());
-                rightExprs.add(rhsJoinExpr);
+                SlotRef leftSlot = lhsJoinExpr.unwrapSlotRef();
+                if (leftSlot.getTable() instanceof OlapTable) {
+                    // table name in SlotRef is not the really name. `select * from test as t`
+                    // table name in SlotRef is `t`, but here we need is `test`.
+                    leftJoinColumnNames.add(leftSlot.getTable().getName() + "-" + leftSlot.getColumnName());

Review comment:
       used to '"."




-- 
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