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

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

                Author: ASF GitHub Bot
            Created on: 20/Apr/22 13:37
            Start Date: 20/Apr/22 13:37
    Worklog Time Spent: 10m 
      Work Description: marton-bod commented on code in PR #3225:
URL: https://github.com/apache/hive/pull/3225#discussion_r854145547


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergDeleteWriter.java:
##########
@@ -53,7 +54,8 @@ public class HiveIcebergDeleteWriter extends 
HiveIcebergWriter {
   public void write(Writable row) throws IOException {
     Record rec = ((Container<Record>) row).get();
     PositionDelete<Record> positionDelete = 
IcebergAcidUtil.getPositionDelete(rec, rowDataTemplate);
-    writer.write(positionDelete, spec, partition(positionDelete.row()));
+    Integer specId = rec.get(0, Integer.class);

Review Comment:
   actually, there's an existing util method to parse out the specid from a 
record, so I'll use that





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

    Worklog Id:     (was: 759236)
    Time Spent: 20m  (was: 10m)

> Iceberg delete writer should handle deleting from old partition specs
> ---------------------------------------------------------------------
>
>                 Key: HIVE-26156
>                 URL: https://issues.apache.org/jira/browse/HIVE-26156
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Marton Bod
>            Assignee: Marton Bod
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> While {{HiveIcebergRecordWriter}} always writes data out according to the 
> latest spec, the {{HiveIcebergDeleteWriter}} might have to write delete files 
> into partitions that correspond to a variety of specs, both old and new. 
> Therefore we should pass the {{{}table.specs(){}}}map into the 
> {{HiveIcebergWriter}} so that the delete writer can choose the appropriate 
> spec on a per-record basis.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to