RussellSpitzer commented on a change in pull request #2437:
URL: https://github.com/apache/iceberg/pull/2437#discussion_r611853308
##########
File path:
spark3/src/main/java/org/apache/iceberg/spark/actions/BaseTableMigrationSparkAction.java
##########
@@ -53,37 +49,28 @@
import org.apache.spark.sql.connector.expressions.Transform;
import org.apache.spark.sql.types.StructType;
-abstract class Spark3CreateAction implements CreateAction {
+abstract class BaseTableMigrationSparkAction<ThisT, R> extends
BaseSparkAction<ThisT, R> {
private static final Set<String> ALLOWED_SOURCES =
ImmutableSet.of("parquet", "avro", "orc", "hive");
protected static final String LOCATION = "location";
protected static final String ICEBERG_METADATA_FOLDER = "metadata";
protected static final List<String> EXCLUDED_PROPERTIES =
ImmutableList.of("path", "transient_lastDdlTime",
"serialization.format");
- private final SparkSession spark;
-
// Source Fields
private final V1Table sourceTable;
private final CatalogTable sourceCatalogTable;
private final String sourceTableLocation;
private final TableCatalog sourceCatalog;
private final Identifier sourceTableIdent;
- // Destination Fields
- private final StagingTableCatalog destCatalog;
- private final Identifier destTableIdent;
-
// Optional Parameters for destination
private final Map<String, String> additionalProperties = Maps.newHashMap();
- Spark3CreateAction(SparkSession spark, CatalogPlugin sourceCatalog,
Identifier sourceTableIdent,
- CatalogPlugin destCatalog, Identifier destTableIdent) {
+ BaseTableMigrationSparkAction(SparkSession spark, CatalogPlugin
sourceCatalog, Identifier sourceTableIdent) {
Review comment:
I liked having this be a non "migrate - snapshot" name here because I
didn't want any confusion if there was an error during "snapshots" that made it
look like it was doing a migrate because of the trace.
--
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]