SourabhBadhya commented on code in PR #5254:
URL: https://github.com/apache/hive/pull/5254#discussion_r1677327573


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/writer/HiveIcebergDeleteWriter.java:
##########
@@ -58,12 +59,12 @@ public void write(Writable row) throws IOException {
     Record rec = ((Container<Record>) row).get();
     PositionDelete<Record> positionDelete = 
IcebergAcidUtil.getPositionDelete(rec, rowDataTemplate);
     int specId = IcebergAcidUtil.parseSpecId(rec);
-    Record rowData = positionDelete.row();
+    PartitionKey partitionKey = IcebergAcidUtil.parsePartitionKey(rec);

Review Comment:
   Added support for this. Done.



##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/IcebergAcidUtil.java:
##########
@@ -252,13 +289,63 @@ public boolean hasNext() {
     public T next() {
       T next = currentIterator.next();
       GenericRecord rec = (GenericRecord) next;
+      IcebergAcidUtil.copyFields(rec, FILE_READ_META_COLS.size(), 
current.size(), current);
+      int specId = IcebergAcidUtil.parseSpecId(rec);
       PositionDeleteInfo.setIntoConf(conf,
-          IcebergAcidUtil.parseSpecId(rec),
+          specId,
           IcebergAcidUtil.computePartitionHash(rec),
           IcebergAcidUtil.parseFilePath(rec),
-          IcebergAcidUtil.parseFilePosition(rec));
-      IcebergAcidUtil.copyFields(rec, FILE_READ_META_COLS.size(), 
current.size(), current);
+          IcebergAcidUtil.parseFilePosition(rec),
+          IcebergAcidUtil.getSerializedPartitionKey(current, 
table.specs().get(specId)));

Review Comment:
   Done.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to