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

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

                Author: ASF GitHub Bot
            Created on: 01/Apr/22 08:51
            Start Date: 01/Apr/22 08:51
    Worklog Time Spent: 10m 
      Work Description: pvary commented on a change in pull request #3131:
URL: https://github.com/apache/hive/pull/3131#discussion_r840373463



##########
File path: 
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputFormat.java
##########
@@ -83,9 +83,19 @@ private static HiveIcebergRecordWriter writer(JobConf jc) {
         .operationId(operationId)
         .build();
     String tableName = jc.get(Catalogs.NAME);
-    HiveFileWriterFactory hfwf = new HiveFileWriterFactory(table, fileFormat, 
schema,
-        null, fileFormat, null, null, null, null);
-    return new HiveIcebergRecordWriter(schema, spec, fileFormat,
-        hfwf, outputFileFactory, io, targetFileSize, taskAttemptID, tableName);
+    if (HiveIcebergStorageHandler.isDelete(jc, tableName)) {
+      // TODO: remove this Avro-specific logic once we have Avro writer 
function ready
+      // for now, this means that Avro delete files will not contain the 'row' 
column
+      Schema positionDeleteRowSchema = fileFormat == FileFormat.AVRO ? null : 
schema;
+      HiveFileWriterFactory hfwf = new HiveFileWriterFactory(table, 
fileFormat, schema,
+          null, fileFormat, null, null, null, positionDeleteRowSchema);
+      return new HiveIcebergDeleteWriter(hfwf, schema, spec, fileFormat, 
outputFileFactory, io, targetFileSize,
+          taskAttemptID, tableName);

Review comment:
       Why do we need different `HiveFileWriterFactory` for different cases? I 
thought that the factory hides that abstraction




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


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

            Worklog Id:     (was: 751454)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>          Time Spent: 10m
>  Remaining Estimate: 0h
>




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

Reply via email to