[ 
https://issues.apache.org/jira/browse/HIVE-27031?focusedWorklogId=844714&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-844714
 ]

ASF GitHub Bot logged work on HIVE-27031:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 10/Feb/23 08:17
            Start Date: 10/Feb/23 08:17
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on code in PR #4026:
URL: https://github.com/apache/hive/pull/4026#discussion_r1102419242


##########
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:
   could we move string literals to constants?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 844714)
    Time Spent: 1h 10m  (was: 1h)

> 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: 1h 10m
>  Remaining Estimate: 0h
>
> Implement copy on write mode for deletes for iceberg tables



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to