nastra commented on code in PR #14739:
URL: https://github.com/apache/iceberg/pull/14739#discussion_r2587920046


##########
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('_', '-');

Review Comment:
   @geruh this is for the actual `FileContent`, which is `data` / 
`position-deletes` / `equality-deletes`. If we ever add a new type with two `-` 
in the name, then that code will be wrong, hence why we should be using 
`.replaceAll("_", "-")` instead of `replace('_', '-')`



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