seawinde commented on code in PR #54953:
URL: https://github.com/apache/doris/pull/54953#discussion_r2285009691
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/JoinUtils.java:
##########
@@ -484,4 +485,23 @@ public static boolean
checkReorderPrecondition(LogicalJoin<?, ?> top, LogicalJoi
markSlots.retainAll(bottom.getOutputSet());
return markSlots.isEmpty();
}
+
+ /**
+ * Use the children nullable property of the join to adjust the slot used
by the join conjuncts.
+ * Such as 'a left join b left join c where b.condition > 1'
+ * if the join change to '(b left join c) right a where b.condition > 1',
+ * the nullable property of b.condition should be false
+ */
+ public static LogicalJoin<Plan, Plan>
adjustJoinConjunctsNullable(LogicalJoin<Plan, Plan> join) {
+ Map<Slot, Slot> childSlotMap = new HashMap<>();
+ for (Plan child : join.children()) {
+ for (Slot slot : child.getOutput()) {
+ childSlotMap.put(slot, slot);
Review Comment:
have fixed
--
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]