[ https://issues.apache.org/jira/browse/HIVE-27031?focusedWorklogId=844934&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-844934 ]
ASF GitHub Bot logged work on HIVE-27031: ----------------------------------------- Author: ASF GitHub Bot Created on: 12/Feb/23 08:15 Start Date: 12/Feb/23 08:15 Worklog Time Spent: 10m Work Description: ayushtkn commented on code in PR #4026: URL: https://github.com/apache/hive/pull/4026#discussion_r1103755089 ########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java: ########## @@ -1153,4 +1152,16 @@ public Map<String, String> getNativeProperties(org.apache.hadoop.hive.ql.metadat props.put(InputFormatConfig.PARTITION_SPEC, PartitionSpecParser.toJson(origTable.spec())); return props; } + + @Override + public boolean shouldOverwrite(org.apache.hadoop.hive.ql.metadata.Table mTable, String operationName) { + String mode = null; + String formatVersion = mTable.getTTable().getParameters().get(TableProperties.FORMAT_VERSION); + // As of now only delete mode is supported, for all others return false + if ("2".equals(formatVersion) && operationName.equalsIgnoreCase("delete")) { + mode = mTable.getTTable().getParameters() + .getOrDefault(TableProperties.DELETE_MODE, TableProperties.DELETE_MODE_DEFAULT); + } + return "copy-on-write".equalsIgnoreCase(mode); Review Comment: Done Issue Time Tracking ------------------- Worklog Id: (was: 844934) Time Spent: 3.5h (was: 3h 20m) > Iceberg: Implement Copy-On-Write for Delete Queries > --------------------------------------------------- > > Key: HIVE-27031 > URL: https://issues.apache.org/jira/browse/HIVE-27031 > Project: Hive > Issue Type: Sub-task > Reporter: Ayush Saxena > Assignee: Ayush Saxena > Priority: Major > Labels: pull-request-available > Time Spent: 3.5h > Remaining Estimate: 0h > > Implement copy on write mode for deletes for iceberg tables -- This message was sent by Atlassian Jira (v8.20.10#820010)