JingsongLi commented on a change in pull request #67: URL: https://github.com/apache/flink-table-store/pull/67#discussion_r841016700
########## File path: flink-table-store-connector/src/test/java/org/apache/flink/table/store/connector/ReadWriteTableITCase.java ########## @@ -1713,4 +1748,74 @@ private static StreamExecutionEnvironment buildBatchEnv() { env.setParallelism(2); return env; } + + @Test + public void testSourceParallelism() throws Exception { + String managedTable = createSourceAndManagedTable(false, false, false, false, false).f1; + + // without hint + String query = prepareSimpleSelectQuery(managedTable, Collections.emptyMap()); + assertThat(sourceParallelism(query)).isEqualTo(env.getParallelism()); + + // with hint + query = + prepareSimpleSelectQuery( + managedTable, Collections.singletonMap(SCAN_PARALLELISM.key(), "66")); + System.out.println(query); + assertThat(sourceParallelism(query)).isEqualTo(66); + } + + private int sourceParallelism(String sql) { + DataStream<Row> stream = tEnv.toChangelogStream(tEnv.sqlQuery(sql)); + return stream.getParallelism(); + } + + @Test + public void testSinkParallelism() { + testSinkParallelism(null, env.getParallelism()); + testSinkParallelism(23, 23); + } + Review comment: this is for testing both default and hint -- 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