You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/12/14 22:35:46 UTC
[GitHub] [iceberg] jfz commented on a change in pull request #3733: Core: Don't delete files during transaction commit when commit state is unknown
jfz commented on a change in pull request #3733:
URL: https://github.com/apache/iceberg/pull/3733#discussion_r769099706
##########
File path: core/src/test/java/org/apache/iceberg/TestTables.java
##########
@@ -80,21 +81,26 @@ public static Transaction beginCreate(File temp, String name, Schema schema,
}
public static Transaction beginReplace(File temp, String name, Schema schema, PartitionSpec spec) {
- return beginReplace(temp, name, schema, spec, SortOrder.unsorted(), ImmutableMap.of());
+ return beginReplace(temp, name, schema, spec, SortOrder.unsorted(), ImmutableMap.of(), null);
}
public static Transaction beginReplace(File temp, String name, Schema schema, PartitionSpec spec,
- SortOrder sortOrder, Map<String, String> properties) {
- TestTableOperations ops = new TestTableOperations(name, temp);
- TableMetadata current = ops.current();
+ SortOrder sortOrder, Map<String, String> properties) {
+ return beginReplace(temp, name, schema, spec, sortOrder, properties, null);
+ }
+
+ public static Transaction beginReplace(File temp, String name, Schema schema, PartitionSpec spec,
+ SortOrder sortOrder, Map<String, String> properties, TestTableOperations ops) {
+ TestTableOperations finalOps = ops != null ? ops : new TestTableOperations(name, temp);
Review comment:
sounds like a good practice
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org