Guosmilesmile commented on code in PR #14271:
URL: https://github.com/apache/iceberg/pull/14271#discussion_r2415579978


##########
flink/v2.0/flink/src/test/java/org/apache/iceberg/flink/SimpleDataUtil.java:
##########
@@ -240,6 +249,28 @@ public static DeleteFile writePosDeleteFile(
     return posWriter.toDeleteFile();
   }
 
+  public static DeleteFile writePosDeleteFile(
+      Table table,
+      PartitionSpec spec,
+      String filename,
+      FileWriterFactory<RowData> writerFactory,
+      List<Pair<CharSequence, Long>> positions)
+      throws IOException {
+    EncryptedOutputFile outputFile =
+        encrypt(fromPath(new Path(table.location(), filename), new 
Configuration()));
+
+    PositionDeleteWriter<RowData> posWriter =
+        writerFactory.newPositionDeleteWriter(outputFile, spec, null);
+    PositionDelete<RowData> posDelete = PositionDelete.create();
+    try (PositionDeleteWriter<RowData> writer = posWriter) {
+      for (Pair<CharSequence, Long> p : positions) {
+        writer.write(posDelete.set(p.first(), p.second(), null));

Review Comment:
   Do we need to use `set(CharSequence newPath, long newPos)` in this PR since 
the method we are currently using has been marked as deprecated?



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