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

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

                Author: ASF GitHub Bot
            Created on: 07/Apr/22 12:09
            Start Date: 07/Apr/22 12:09
    Worklog Time Spent: 10m 
      Work Description: marton-bod commented on code in PR #3131:
URL: https://github.com/apache/hive/pull/3131#discussion_r845056909


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergDeleteWriter.java:
##########
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.iceberg.mr.hive;
+
+import java.io.IOException;
+import java.util.List;
+import org.apache.hadoop.io.Writable;
+import org.apache.hadoop.mapred.TaskAttemptID;
+import org.apache.iceberg.DeleteFile;
+import org.apache.iceberg.FileFormat;
+import org.apache.iceberg.PartitionSpec;
+import org.apache.iceberg.Schema;
+import org.apache.iceberg.data.Record;
+import org.apache.iceberg.deletes.PositionDelete;
+import org.apache.iceberg.io.ClusteredPositionDeleteWriter;
+import org.apache.iceberg.io.FileIO;
+import org.apache.iceberg.io.FileWriterFactory;
+import org.apache.iceberg.io.OutputFileFactory;
+import org.apache.iceberg.mr.mapred.Container;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class HiveIcebergDeleteWriter extends HiveIcebergWriter {
+  private static final Logger LOG = 
LoggerFactory.getLogger(HiveIcebergDeleteWriter.class);
+
+  private final ClusteredPositionDeleteWriter<Record> deleteWriter;

Review Comment:
   Yes, we can use `PartitioningWriter` as the common ancestor, which has the 
`write()` and `close()` methods conveniently. I've moved the writer object into 
the parent class, and now the children don't need to override the `close()` 
method anymore. However, in `files()` we need to cast to `DataWriteResult` and 
`DeleteWriteResult`





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

    Worklog Id:     (was: 754003)
    Time Spent: 12h 10m  (was: 12h)

> Implement DELETE statements for Iceberg tables
> ----------------------------------------------
>
>                 Key: HIVE-26102
>                 URL: https://issues.apache.org/jira/browse/HIVE-26102
>             Project: Hive
>          Issue Type: New Feature
>            Reporter: Marton Bod
>            Assignee: Marton Bod
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 12h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to