JingsongLi commented on a change in pull request #11405: [FLINK-16413]Reduce hive source parallelism when limit push down URL: https://github.com/apache/flink/pull/11405#discussion_r392751442
########## File path: flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/HiveTableSourceTest.java ########## @@ -410,6 +410,32 @@ public void testParallelismSetting() { Assert.assertEquals(2, transformation.getParallelism()); } + @Test + public void testParallelismOnLimitPushDown() { + final String catalogName = "hive"; + final String dbName = "source_db"; + final String tblName = "test_parallelism_limit_pushdown"; + hiveShell.execute("CREATE TABLE source_db.test_parallelism_limit_pushdown " + + "(year STRING, value INT) partitioned by (pt int);"); + HiveTestUtils.createTextTableInserter(hiveShell, dbName, tblName) + .addRow(new Object[]{"2014", 3}) + .addRow(new Object[]{"2014", 4}) + .commit("pt=0"); + HiveTestUtils.createTextTableInserter(hiveShell, dbName, tblName) + .addRow(new Object[]{"2015", 2}) + .addRow(new Object[]{"2015", 5}) + .commit("pt=1"); + TableEnvironment tEnv = HiveTestUtils.createTableEnvWithBlinkPlannerBatchMode(); Review comment: Add this for real test parallelism: ``` tEnv.getConfig().getConfiguration().setBoolean( HiveOptions.TABLE_EXEC_HIVE_FALLBACK_MAPRED_READER, false); tEnv.getConfig().getConfiguration().setInteger( ExecutionConfigOptions.TABLE_EXEC_RESOURCE_DEFAULT_PARALLELISM, 2); ``` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services