nastra commented on code in PR #12782:
URL: https://github.com/apache/iceberg/pull/12782#discussion_r2046569682


##########
spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/procedures/MigrateTableProcedure.java:
##########
@@ -107,12 +105,10 @@ public InternalRow[] call(InternalRow args) {
       migrateTableSparkAction = 
migrateTableSparkAction.backupTableName(backupTableName);
     }
 
-    if (!args.isNullAt(4)) {
-      int parallelism = args.getInt(4);
-      Preconditions.checkArgument(parallelism > 0, "Parallelism should be 
larger than 0");
-      migrateTableSparkAction =
-          
migrateTableSparkAction.executeWith(SparkTableUtil.migrationService(parallelism));
-    }
+    int parallelism = input.asInt(PARALLELISM_PARAM, 1);

Review Comment:
   yeah I agree, the default value should be null here instead of 1 but at the 
same time the migration service will use a null executor service if parallelism 
is set to 1, so I'm fine either way



-- 
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...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to