aokolnychyi commented on code in PR #8227:
URL: https://github.com/apache/iceberg/pull/8227#discussion_r1297669471


##########
spark/v3.4/spark/src/main/java/org/apache/iceberg/spark/procedures/MigrateTableProcedure.java:
##########
@@ -91,15 +92,16 @@ public InternalRow[] call(InternalRow args) {
     }
 
     boolean dropBackup = args.isNullAt(2) ? false : args.getBoolean(2);
+    String backupTableName = args.isNullAt(3) ? "" : args.getString(3);

Review Comment:
   Instead of using an empty string, I think we should use null and adapt the 
logic below.
   
   ```
   MigrateTableSparkAction action =
       actions().migrateTable(tableName).tableProperties(properties);
   
   if (dropBackup) {
     action.dropBackup();
   }
   
   if (backupTableName != null) {
     action.backupTableName(backupTableName);
   }
   
   MigrateTable.Result result = action.execute();
   ```



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