aokolnychyi commented on code in PR #11675: URL: https://github.com/apache/iceberg/pull/11675#discussion_r1924427229
########## core/src/main/java/org/apache/iceberg/PositionDeletesTable.java: ########## @@ -110,32 +110,47 @@ public Map<String, String> properties() { } private Schema calculateSchema() { + int formatVersion = TableUtil.formatVersion(table()); Types.StructType partitionType = Partitioning.partitionType(table()); - List<Types.NestedField> columns = - ImmutableList.of( - MetadataColumns.DELETE_FILE_PATH, - MetadataColumns.DELETE_FILE_POS, - Types.NestedField.optional( - MetadataColumns.DELETE_FILE_ROW_FIELD_ID, - MetadataColumns.DELETE_FILE_ROW_FIELD_NAME, - table().schema().asStruct(), - MetadataColumns.DELETE_FILE_ROW_DOC), + ImmutableList.Builder<Types.NestedField> builder = + ImmutableList.<Types.NestedField>builder() + .add(MetadataColumns.DELETE_FILE_PATH) + .add(MetadataColumns.DELETE_FILE_POS); + if (formatVersion == 2) { Review Comment: V3 tables can still include V2 delete files. -- 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