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


##########
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:
   I think we can optimize this for loop by the way to reduce the time 
complexity. If the `catalogTable` has already been added to the collection 
`tables`, we can just exit the loop without having to do subsequent comparison 
operations.



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