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: [email protected]

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