[ https://issues.apache.org/jira/browse/HIVE-26102?focusedWorklogId=753928&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-753928 ]
ASF GitHub Bot logged work on HIVE-26102: ----------------------------------------- Author: ASF GitHub Bot Created on: 07/Apr/22 09:34 Start Date: 07/Apr/22 09:34 Worklog Time Spent: 10m Work Description: pvary commented on code in PR #3131: URL: https://github.com/apache/hive/pull/3131#discussion_r844925536 ########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergOutputFormat.java: ########## @@ -83,9 +83,20 @@ 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); + HiveFileWriterFactory writerFactory = new HiveFileWriterFactory(table, fileFormat, schema, null, fileFormat, + null, null, null, getPositionDeleteRowSchema(schema, fileFormat)); + if (HiveIcebergStorageHandler.isDelete(jc, tableName)) { + return new HiveIcebergDeleteWriter(schema, spec, fileFormat, writerFactory, outputFileFactory, io, targetFileSize, + taskAttemptID, tableName); + } else { + return new HiveIcebergRecordWriter(schema, spec, fileFormat, writerFactory, outputFileFactory, io, targetFileSize, + taskAttemptID, tableName); + } + } + + private static Schema getPositionDeleteRowSchema(Schema schema, FileFormat fileFormat) { + // TODO: remove this Avro-specific logic once we have Avro writer function ready Review Comment: Is it implemented in the Iceberg project? Is there an existing PR or issue for it? Issue Time Tracking ------------------- Worklog Id: (was: 753928) Time Spent: 8h 20m (was: 8h 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 > Labels: pull-request-available > Time Spent: 8h 20m > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.1#820001)