morrySnow commented on code in PR #11812:
URL: https://github.com/apache/doris/pull/11812#discussion_r951036619


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/util/JoinUtils.java:
##########
@@ -87,6 +91,117 @@ private static boolean isEqualTo(List<SlotReference> 
leftSlots, List<SlotReferen
                 || (leftSlotsSet.containsAll(rightUsed) && 
rightSlotsSet.containsAll(leftUsed));
     }
 
+    private static class JoinSlotCoverageChecker {
+        HashSet<SlotReference> left;
+        HashSet<ExprId> leftExprIds;
+        HashSet<SlotReference> right;
+        HashSet<ExprId> rightExprIds;
+
+        JoinSlotCoverageChecker(List<SlotReference> left, List<SlotReference> 
right) {
+            this.left = new HashSet<>(left);
+            leftExprIds = new 
HashSet<>(left.stream().map(SlotReference::getExprId).collect(Collectors.toList()));
+            this.right = new HashSet<>(right);
+            rightExprIds = new 
HashSet<>(right.stream().map(SlotReference::getExprId).collect(Collectors.toList()));
+        }
+
+        boolean isCoveredByLeftSlots(List<SlotReference> slots) {
+            boolean covered = left.containsAll(slots);

Review Comment:
   > I am not sure that only comparing ExprId covers all cases
   
   It is.



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

Reply via email to