mumuhhh commented on code in PR #24600:
URL: https://github.com/apache/flink/pull/24600#discussion_r1600841072


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java:
##########
@@ -115,7 +117,7 @@ private static class DppDimSideChecker {
         private final RelNode relNode;
         private boolean hasFilter;
         private boolean hasPartitionedScan;
-        private final List<ContextResolvedTable> tables = new ArrayList<>();
+        private final Set<ContextResolvedTable> tables = new HashSet<>();

Review Comment:
   Why do we write traversal comparisons like that?
   ```
                   boolean hasAdded = false;
                   for (ContextResolvedTable thisTable : new 
ArrayList<>(tables)) {
                       if 
(thisTable.getIdentifier().equals(catalogTable.getIdentifier())) {
                           hasAdded = true;
                           break;
                       }
                   }
                   if (!hasAdded) {
                       tables.add(catalogTable);
                   }
   ```



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to