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: [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]