[ https://issues.apache.org/jira/browse/HIVE-26102?focusedWorklogId=753941&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-753941 ]
ASF GitHub Bot logged work on HIVE-26102: ----------------------------------------- Author: ASF GitHub Bot Created on: 07/Apr/22 09:57 Start Date: 07/Apr/22 09:57 Worklog Time Spent: 10m Work Description: pvary commented on code in PR #3131: URL: https://github.com/apache/hive/pull/3131#discussion_r844948586 ########## iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/mapreduce/IcebergInputFormat.java: ########## @@ -484,10 +500,35 @@ private static Schema readSchema(Configuration conf, Schema tableSchema, boolean String[] selectedColumns = InputFormatConfig.selectedColumns(conf); if (selectedColumns == null) { - return tableSchema; + return table.schema(); + } + + readSchema = caseSensitive ? table.schema().select(selectedColumns) : + table.schema().caseInsensitiveSelect(selectedColumns); + + // for DELETE queries, add additional metadata columns into the read schema + if (HiveIcebergStorageHandler.isDelete(conf, conf.get(Catalogs.NAME))) { + readSchema = IcebergAcidUtil.createFileReadSchemaForDelete(readSchema.columns(), table); } - return caseSensitive ? tableSchema.select(selectedColumns) : tableSchema.caseInsensitiveSelect(selectedColumns); + return readSchema; + } + + private Schema schemaWithoutConstantsAndMeta(Schema readSchema, Map<Integer, ?> idToConstant) { Review Comment: Could this be a static method? Issue Time Tracking ------------------- Worklog Id: (was: 753941) Time Spent: 9.5h (was: 9h 20m) > 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: 9.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.20.1#820001)