You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2022/10/06 14:33:51 UTC

[GitHub] [hive] rbalamohan commented on a diff in pull request #3646: HIVE-26596: Hive should enforce merge-on-read delete mode is set for Iceberg V2 tables

rbalamohan commented on code in PR #3646:
URL: https://github.com/apache/hive/pull/3646#discussion_r989129160


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/Catalogs.java:
##########
@@ -144,6 +145,12 @@ public static Table createTable(Configuration conf, Properties props) {
 
     Map<String, String> map = filterIcebergTableProperties(props);
 
+    // Hive only supports merge-on-read delete mode, it will actually throw an error if DML operations are attempted on
+    // tables that don't have this (the default is copy-on-write)
+    if ("2".equals(props.get(TableProperties.FORMAT_VERSION))) {
+      map.put(TableProperties.DELETE_MODE, "merge-on-read");

Review Comment:
   Will this be deleted when copy-on-write is supported later? If so, it will be good to add a minor TODO here.



-- 
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: gitbox-unsubscribe@hive.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org