This is an automated email from the ASF dual-hosted git repository.
blue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iceberg.git
The following commit(s) were added to refs/heads/master by this push:
new a241091 Spark: Handle name mapping assignment errors in snapshot
action (#2417)
a241091 is described below
commit a2410913da948842a88243a2e42235a8beb02c1c
Author: Anton Okolnychyi <[email protected]>
AuthorDate: Tue Apr 6 15:57:03 2021 -0700
Spark: Handle name mapping assignment errors in snapshot action (#2417)
---
.../main/java/org/apache/iceberg/actions/Spark3SnapshotAction.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/spark3/src/main/java/org/apache/iceberg/actions/Spark3SnapshotAction.java
b/spark3/src/main/java/org/apache/iceberg/actions/Spark3SnapshotAction.java
index 3fa81f5..7062cdc 100644
--- a/spark3/src/main/java/org/apache/iceberg/actions/Spark3SnapshotAction.java
+++ b/spark3/src/main/java/org/apache/iceberg/actions/Spark3SnapshotAction.java
@@ -59,10 +59,10 @@ public class Spark3SnapshotAction extends
Spark3CreateAction implements Snapshot
Table icebergTable = stagedTable.table();
// TODO Check table location here against source location
- ensureNameMappingPresent(icebergTable);
-
boolean threw = true;
try {
+ ensureNameMappingPresent(icebergTable);
+
String stagingLocation = getMetadataLocation(icebergTable);
LOG.info("Beginning snapshot of {} to {} using metadata location {}",
sourceTableIdent(), destTableIdent(),
stagingLocation);