aokolnychyi commented on a change in pull request #1525:
URL: https://github.com/apache/iceberg/pull/1525#discussion_r526457651
##########
File path: spark/src/main/java/org/apache/iceberg/actions/Actions.java
##########
@@ -77,6 +82,120 @@ public ExpireSnapshotsAction expireSnapshots() {
return new ExpireSnapshotsAction(spark, table);
}
+ /**
+ * Converts the provided table into an Iceberg table in place. The table
will no longer be represented by it's
+ * previous provider in the session catalog and a new metadata directory
will be created at the table's location.
+ *
+ * @param tableName Table to be converted
+ * @return {@link CreateAction} to perform migration
+ */
+ public static CreateAction migrate(String tableName) {
Review comment:
Well, it seems we rely too much on reflection here. When we decided to
use reflection to split actions, we did not have these static methods and it
was reasonable since the scope of the change was smaller compared to
introducing `BaseActions`. I am no longer sure reflection is a good idea here
as making these methods work with reflection is more complicated than having
`BaseActions`. On top, we don't have compile time checks. Users will call these
methods in Spark 2 and will get runtime exceptions. I'd prefer to not expose
those methods at all.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]