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 2022/09/20 02:55:26 UTC
[GitHub] [doris] morrySnow commented on a diff in pull request #12743: [enhancement](Nereids) compare LogicalProperties with output set instead of output list
morrySnow commented on code in PR #12743:
URL: https://github.com/apache/doris/pull/12743#discussion_r974839902
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/PhysicalPlanTranslator.java:
##########
@@ -579,54 +578,59 @@ public PlanFragment visitPhysicalHashJoin(
.map(SlotReference.class::cast)
.forEach(s -> hashOutputSlotReferenceMap.put(s.getExprId(), s));
+ Map<ExprId, SlotReference> leftChildOutputMap = Maps.newHashMap();
+ hashJoin.child(0).getOutput().stream()
+ .map(SlotReference.class::cast)
+ .forEach(s -> leftChildOutputMap.put(s.getExprId(), s));
+ Map<ExprId, SlotReference> rightChildOutputMap = Maps.newHashMap();
+ hashJoin.child(1).getOutput().stream()
+ .map(SlotReference.class::cast)
+ .forEach(s -> rightChildOutputMap.put(s.getExprId(), s));
+
//make intermediate tuple
List<SlotDescriptor> leftIntermediateSlotDescriptor = Lists.newArrayList();
List<SlotDescriptor> rightIntermediateSlotDescriptor = Lists.newArrayList();
TupleDescriptor intermediateDescriptor = context.generateTupleDesc();
if (!hashJoin.getOtherJoinCondition().isPresent()
&& (joinType == JoinType.LEFT_ANTI_JOIN || joinType == JoinType.LEFT_SEMI_JOIN)) {
- leftIntermediateSlotDescriptor = hashJoin.child(0).getOutput().stream()
- .map(SlotReference.class::cast)
- .map(s -> context.createSlotDesc(intermediateDescriptor, s))
- .collect(Collectors.toList());
+ for (SlotDescriptor leftSlotDescriptor : leftSlotDescriptors) {
+ SlotReference sf = leftChildOutputMap.get(context.findExprId(leftSlotDescriptor.getId()));
Review Comment:
this PR is block other job, need fast merge, fix it in next PR
--
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