amogh-jahagirdar commented on code in PR #6624:
URL: https://github.com/apache/iceberg/pull/6624#discussion_r1081932750


##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/procedures/SnapshotTableProcedure.java:
##########
@@ -93,10 +94,20 @@ public InternalRow[] call(InternalRow args) {
               });
     }
 
+    int parallelism;
+    if (!args.isNullAt(4)) {
+      parallelism = args.getInt(4);
+    } else {
+      parallelism = 1;
+    }

Review Comment:
   Nit: I think it's a bit cleaner to use ternary here
   
   `int parallelism = args.getInt(4) != null ? args.getInt(4) : 1`



##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/procedures/MigrateTableProcedure.java:
##########
@@ -99,7 +100,13 @@ public InternalRow[] call(InternalRow args) {
     if (dropBackup) {
       result = migrateTableSparkAction.dropBackup().execute();
     } else {
-      result = migrateTableSparkAction.execute();
+      int parallelism;
+      if (!args.isNullAt(3)) {
+        parallelism = args.getInt(3);
+      } else {
+        parallelism = 1;
+      }

Review Comment:
   Same nit as below i think ternary assignment works well here



##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/procedures/MigrateTableProcedure.java:
##########
@@ -39,7 +39,8 @@ class MigrateTableProcedure extends BaseProcedure {
       new ProcedureParameter[] {
         ProcedureParameter.required("table", DataTypes.StringType),
         ProcedureParameter.optional("properties", STRING_MAP),
-        ProcedureParameter.optional("drop_backup", DataTypes.BooleanType)
+        ProcedureParameter.optional("drop_backup", DataTypes.BooleanType),
+        ProcedureParameter.optional("max_concurrent_read_datafiles", 
DataTypes.IntegerType)

Review Comment:
   Any reason we can't just call this parameter "parallelism" ? I think it will 
only be data files involved



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