Aggarwal-Raghav commented on code in PR #6856:
URL: https://github.com/apache/hive/pull/6856#discussion_r4222658828
##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/test/utils/HiveIcebergTestUtils.java:
##########
@@ -407,12 +410,14 @@ public static DeleteFile createPositionalDeleteFile(Table
table, String deleteFi
partitionKey.partition(record);
}
- PositionDeleteWriter<Record> posWriter =
appenderFactory.newPosDeleteWriter(outputFile, fileFormat, partitionKey);
- try (PositionDeleteWriter<Record> writer = posWriter) {
+ PositionDeleteWriter<Record> posWriter = writerFactory
+ .newPositionDeleteWriter(outputFile, table.spec(), partitionKey);
+ try (posWriter) {
deletes.forEach(del -> {
PositionDelete positionDelete = PositionDelete.create();
- positionDelete.set(del.path(), del.pos(), del.row());
- writer.write(positionDelete);
+ positionDelete.set(del.path(), del.pos());
+ positionDelete.set(2, del.get(2, Record.class));
Review Comment:
The `.set(path, pos, row)` was removed in
https://github.com/apache/iceberg/pull/17696 which was used by V2 spec, but to
similuate the same behaviour as users will have V2 tables, the workaround/new
way is picked from iceberg UT's
please check this:
https://github.com/apache/iceberg/blob/213a4b557db8c0a9b1eea90b908a4e6f3b1cbdf5/core/src/test/java/org/apache/iceberg/TestRewriteTablePathUtil.java#L582-L589
--
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]