morrySnow commented on code in PR #10659:
URL: https://github.com/apache/doris/pull/10659#discussion_r916502178
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java:
##########
@@ -288,23 +333,24 @@ public PlanFragment visitPhysicalHashJoin(
leftFragment.setPlanRoot(crossJoinNode);
context.addPlanFragment(leftFragment);
return leftFragment;
+ } else {
+ Expression eqJoinExpression =
physicalHashJoin.getCondition().get();
+ List<Expr> execEqConjunctList =
ExpressionUtils.extractConjunct(eqJoinExpression).stream()
+ .map(EqualTo.class::cast)
+ .map(e -> swapEqualToForChildrenOrder(e,
hashJoin.left().getOutput()))
+ .map(e -> ExpressionTranslator.translate(e, context))
+ .collect(Collectors.toList());
+
+ HashJoinNode hashJoinNode = new
HashJoinNode(context.nextPlanNodeId(), leftFragmentPlanRoot,
+ rightFragmentPlanRoot,
+ JoinType.toJoinOperator(physicalHashJoin.getJoinType()),
execEqConjunctList, Lists.newArrayList());
+
+ hashJoinNode.setDistributionMode(DistributionMode.BROADCAST);
Review Comment:
i think do these in translator is better than in `finalizeForNereids`. since
we do not need to change stale planner's class at all. The reason why
expression use `finalizeForNereids` is stale planner's `Expr` have too many
properties need to set. i don't think PlanNode has the same problem.
--
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]