stevenzwu commented on code in PR #13878:
URL: https://github.com/apache/iceberg/pull/13878#discussion_r2288999010


##########
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:
   are both hints and with properties passed to the table source as 
`properties`?
   
   Can we also add a unit test where both are set and make sure the proper 
overwrite order is applied?



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

Reply via email to