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


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/writer/HiveIcebergDeleteWriter.java:
##########
@@ -43,27 +44,30 @@ class HiveIcebergDeleteWriter extends HiveIcebergWriterBase 
{
 
   private final GenericRecord rowDataTemplate;
   private final boolean skipRowData;
+  private final boolean isMerge;
 
   HiveIcebergDeleteWriter(Schema schema, Map<Integer, PartitionSpec> specs,
       FileWriterFactory<Record> writerFactory, OutputFileFactory fileFactory, 
FileIO io,
-      long targetFileSize, boolean skipRowData) {
+      long targetFileSize, boolean skipRowData, boolean isMerge) {
     super(schema, specs, io,
         new ClusteredPositionDeleteWriter<>(writerFactory, fileFactory, io, 
targetFileSize));
     rowDataTemplate = GenericRecord.create(schema);
     this.skipRowData = skipRowData;
+    this.isMerge = isMerge;
   }
 
   @Override
   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 = isMerge ? 
IcebergAcidUtil.parsePartitionKey(rec) :

Review Comment:
   👍 



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