jeyhunkarimov commented on code in PR #24788: URL: https://github.com/apache/flink/pull/24788#discussion_r1602288457
########## flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/utils/DynamicPartitionPruningUtils.java: ########## @@ -234,20 +234,16 @@ private static boolean isSuitableFilter(RexNode filterCondition) { } private void setTables(ContextResolvedTable catalogTable) { - if (tables.size() == 0) { - tables.add(catalogTable); - } else { - boolean hasAdded = false; - for (ContextResolvedTable thisTable : new ArrayList<>(tables)) { - if (hasAdded) { - break; - } - if (!thisTable.getIdentifier().equals(catalogTable.getIdentifier())) { - tables.add(catalogTable); - hasAdded = true; - } + boolean alreadyExists = false; + for (ContextResolvedTable table : tables) { Review Comment: Good point. But note that `tables` is of type `Set` already -- 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