swapna267 commented on code in PR #13878:
URL: https://github.com/apache/iceberg/pull/13878#discussion_r2289494481
##########
flink/v2.0/flink/src/test/java/org/apache/iceberg/flink/source/TestStreamScanSql.java:
##########
@@ -431,4 +435,36 @@ public void testConsumeFromStartTag() throws Exception {
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("START_SNAPSHOT_ID and START_TAG cannot both be set.");
}
+
+ @TestTemplate
+ void testWithParallelismWithProps() {
+ int customScanParallelism = defaultJobParallelism + 1;
+ sql(
+ "CREATE TABLE %s (id INT, data VARCHAR, dt VARCHAR) WITH
('scan.parallelism'='%s')",
+ TABLE, customScanParallelism);
+
+ final org.apache.flink.table.api.Table table =
+ getTableEnv().sqlQuery(String.format("select * from %s", TABLE));
+ final String explain = table.explain(ExplainDetail.JSON_EXECUTION_PLAN);
+ final String expectedPhysicalExecutionPlanFragment =
+ "\"parallelism\" : " + customScanParallelism;
+ assertThat(explain).contains(expectedPhysicalExecutionPlanFragment);
+ }
+
+ @TestTemplate
+ void testWithParallelismWithHints() {
+ sql("CREATE TABLE %s (id INT, data VARCHAR, dt VARCHAR)", TABLE);
+ int customScanParallelism = defaultJobParallelism + 1;
+
+ final org.apache.flink.table.api.Table table =
+ getTableEnv()
+ .sqlQuery(
+ String.format(
+ "select * from %s/*+ OPTIONS('streaming'='true',
'scan.parallelism'='%s') */",
Review Comment:
Yes both combined into properties , with hints overriding the create table
properties.
Sure, adding a test case for that.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]