nastra commented on code in PR #11545: URL: https://github.com/apache/iceberg/pull/11545#discussion_r1856758569
########## spark/v3.5/spark/src/main/java/org/apache/iceberg/spark/source/SparkPositionDeletesRewrite.java: ########## @@ -362,10 +367,18 @@ public void write(InternalRow record) throws IOException { InternalRow row = record.getStruct(rowOrdinal, rowSize); if (row != null) { positionDelete.set(file, position, row); - lazyWriterWithRow().write(positionDelete, spec, partition); + if (formatVersion >= 3) { Review Comment: instead of checking the format version here we can alternatively have a separate `private static class DVWriter implements DataWriter<InternalRow>` (similar to the current `DeleteWriter`). We'd then have the following code in L246ff: ``` if (TableUtil.formatVersion(table) >= 3) { return new DVWriter(table, deleteFileFactory, dsSchema, specId, partition); } return new DeleteWriter( table, writerFactoryWithRow, // other params ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org