morningman commented on a change in pull request #1471: Planner support push 
down predicates past agg, win and sort
URL: https://github.com/apache/incubator-doris/pull/1471#discussion_r303278309
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/Expr.java
 ##########
 @@ -1084,6 +1084,17 @@ public boolean isBound(SlotId slotId) {
         return true;
     }
 
+    public boolean isBound(List<SlotId> slotIds) {
+        final List<TupleId> exprTupleIds = Lists.newArrayList();
+        final List<SlotId> exprSlotIds = Lists.newArrayList();
+        getIds(exprTupleIds, exprSlotIds);
+
+        final List<SlotId> intersection = Lists.newArrayList();
+        intersection.addAll(exprSlotIds);
 
 Review comment:
   Why not just reuse the exprSlotIds to calculate the intersection?
   like: 
   exprSlotIds.retainAll(slotIds);
   And you can just `!return exprSlotIds.retainAll(slotIds)`.
   If exprSlotIds changes, retainAll will return true.
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to