nastra commented on code in PR #14739:
URL: https://github.com/apache/iceberg/pull/14739#discussion_r2584360854
##########
core/src/main/java/org/apache/iceberg/ContentFileParser.java:
##########
@@ -84,9 +85,13 @@ public static void toJson(ContentFile<?> contentFile,
PartitionSpec spec, JsonGe
// as it isn't used and BaseFile constructor doesn't support it.
generator.writeNumberField(SPEC_ID, contentFile.specId());
- generator.writeStringField(CONTENT, contentFile.content().name());
+ // Since 1.11, we serialize content as lowercase kebab-case values like
"equality-deletes"
+ String contentValue =
contentFile.content().name().toLowerCase(Locale.ROOT).replace('_', '-');
+ generator.writeStringField(CONTENT, contentValue);
generator.writeStringField(FILE_PATH, contentFile.location());
- generator.writeStringField(FILE_FORMAT, contentFile.format().name());
+ // Since 1.11, we serialize format as lower-case strings like "parquet"
+ String formatValue = contentFile.format().name().toLowerCase(Locale.ROOT);
+ generator.writeStringField(FILE_FORMAT, formatValue);
Review Comment:
nit: can we inline this and `contentValue`?
--
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]