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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]