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


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/optimize/program/DynamicPartitionPruningProgramTest.java:
##########
@@ -81,6 +87,42 @@ void setup() {
                                 + ")");
     }
 
+    @Test
+    void testLargeQueryPlanShouldNotOutOfMemory() {
+        // TABLE_OPTIMIZER_DYNAMIC_FILTERING_ENABLED is already enabled
+        List<String> strings = new ArrayList<>();
+        for (int i = 0; i < 100; i++) {
+            util.tableEnv()
+                    .executeSql(
+                            "CREATE TABLE IF NOT EXISTS table"
+                                    + i
+                                    + "(att STRING,filename STRING) "
+                                    + "with("
+                                    + "     'connector' = 'values', "
+                                    + "     'runtime-source' = 'NewSource', "
+                                    + "     'bounded' = 'true'"
+                                    + ")");
+            strings.add("select att,filename from table" + i);
+        }
+
+        final String countName = "CNM";
+        Table allUnionTable = util.tableEnv().sqlQuery(String.join(" UNION ALL 
", strings));
+        Table res =

Review Comment:
   Can you complete this test pattern using SQL query purely instead of table 
API?



##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/optimize/program/DynamicPartitionPruningProgramTest.java:
##########
@@ -81,6 +87,42 @@ void setup() {
                                 + ")");
     }
 
+    @Test
+    void testLargeQueryPlanShouldNotOutOfMemory() {
+        // TABLE_OPTIMIZER_DYNAMIC_FILTERING_ENABLED is already enabled
+        List<String> strings = new ArrayList<>();

Review Comment:
   strings -> subQueries?



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