RussellSpitzer commented on a change in pull request #1525:
URL: https://github.com/apache/iceberg/pull/1525#discussion_r539501187



##########
File path: spark3/src/main/java/org/apache/iceberg/actions/SparkActions.java
##########
@@ -20,10 +20,54 @@
 package org.apache.iceberg.actions;
 
 import org.apache.iceberg.Table;
+import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
+import org.apache.iceberg.spark.Spark3Util;
 import org.apache.spark.sql.SparkSession;
+import org.apache.spark.sql.catalyst.parser.ParseException;
 
-class SparkActions extends Actions {
+public class SparkActions extends Actions {
   protected SparkActions(SparkSession spark, Table table) {
     super(spark, table);
   }
+
+  public static CreateAction migrate(String tableName) {
+    return migrate(SparkSession.active(), tableName);
+  }
+
+  public static CreateAction migrate(SparkSession spark, String tableName) {
+    Spark3Util.CatalogAndIdentifier catalogAndIdentifier;
+    try {
+      catalogAndIdentifier = Spark3Util.catalogAndIdentifier(spark, tableName);
+    } catch (ParseException e) {
+      throw new IllegalArgumentException("Cannot parse migrate target", e);

Review comment:
       Switched to using the method added by Anton in the other PR




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

Reply via email to