nastra commented on code in PR #10037:
URL: https://github.com/apache/iceberg/pull/10037#discussion_r1559655890
##########
spark/v3.5/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestMigrateTableProcedure.java:
##########
@@ -232,4 +237,42 @@ public void testMigrateEmptyTable() throws Exception {
Object result = scalarSql("CALL %s.system.migrate('%s')", catalogName,
tableName);
assertThat(result).isEqualTo(0L);
}
+
+ @TestTemplate
+ public void testMigrateWithParallelism() throws IOException {
+ assumeThat(catalogName).isEqualToIgnoringCase("spark_catalog");
+
+ testWithParallelism(-1);
+ testWithParallelism(0);
+ testWithParallelism(1);
+ testWithParallelism(5);
+ }
+
+ private void testWithParallelism(int parallelism) throws IOException {
+ String location = Files.createTempDirectory(temp,
"junit").toFile().toString();
+ sql(
+ "CREATE TABLE %s (id bigint NOT NULL, data string) USING parquet
LOCATION '%s'",
+ tableName, location);
+ sql("INSERT INTO TABLE %s VALUES (1, 'a')", tableName);
+ sql("INSERT INTO TABLE %s VALUES (2, 'b')", tableName);
+
+ try (MockedStatic<MoreExecutors> executors =
mockStatic(MoreExecutors.class)) {
+ ProcedureUtil.TestExecutorService testService = new
ProcedureUtil.TestExecutorService();
Review Comment:
should this pass `parallelism` to the executor service?
--
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]