szehon-ho commented on code in PR #5622:
URL: https://github.com/apache/iceberg/pull/5622#discussion_r977913967
##########
api/src/main/java/org/apache/iceberg/actions/ActionsProvider.java:
##########
@@ -31,6 +31,11 @@ default SnapshotTable snapshotTable(String sourceTableIdent)
{
/** Instantiates an action to migrate an existing table to Iceberg. */
default MigrateTable migrateTable(String tableIdent) {
+ return migrateTable(tableIdent, false);
+ }
+
+ /** Instantiates an action to migrate an existing table to Iceberg. */
+ default MigrateTable migrateTable(String tableIdent, Boolean dropBackup) {
Review Comment:
Better but not exactly what I meant, I think we still need an extra method
on MigrateTableAction object (MigrateTableAction::dropBackup(boolean)).
Otherwise piggybacking with properties there would make it go to
tableProperties?
##########
spark/v3.0/spark/src/main/java/org/apache/iceberg/spark/actions/BaseMigrateTableSparkAction.java:
##########
@@ -112,6 +112,8 @@ private MigrateTable.Result doExecute() {
StagedSparkTable stagedTable = null;
Table icebergTable;
boolean threw = true;
+ boolean dropBackup =
+ Boolean.parseBoolean(additionalProperties().getOrDefault("dropBackup",
"false"));
Review Comment:
So additionalProperties() looks like properties that will be set on the
target table, right? That's not great because then there will be this extra
property 'dropBackup' that's useless for the Iceberg table.
So I think , let's add an extra method on
MigrateTableSparkAction.dropBackup(boolean), and propagate it via its own
dedicated argument in the procedure?
--
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]