deniskuzZ commented on code in PR #4852:
URL: https://github.com/apache/hive/pull/4852#discussion_r1399061787


##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergV2.java:
##########
@@ -403,10 +407,21 @@ public void testDeleteForSupportedTypes() throws 
IOException {
   }
 
   @Test
-  public void testUpdateStatementUnpartitioned() {
+  public void testUpdateStatementUnpartitioned() throws TException, 
InterruptedException {
+    executeUpdateAndValidateDataUnpartitioned(2);
+  }
+
+  private void executeUpdateAndValidateDataUnpartitioned(int formatVersion) 
throws TException, InterruptedException {
     // create and insert an initial batch of records
     testTables.createTable(shell, "customers", 
HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA,
-        PartitionSpec.unpartitioned(), fileFormat, 
HiveIcebergStorageHandlerTestUtils.OTHER_CUSTOMER_RECORDS_2, 2);
+        PartitionSpec.unpartitioned(), fileFormat, 
HiveIcebergStorageHandlerTestUtils.OTHER_CUSTOMER_RECORDS_2,
+        formatVersion);
+
+    // verify update mode set to merge-on-read
+    Assert.assertEquals(formatVersion == 2 ? 
HiveIcebergStorageHandler.MERGE_ON_READ : null,
+        shell.metastore().getTable("default", "customers")
+            .getParameters().get(TableProperties.UPDATE_MODE));

Review Comment:
   yes, v1 is copy-on-write



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