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


##########
core/src/main/java/org/apache/iceberg/ContentFileParser.java:
##########
@@ -84,9 +88,12 @@ 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"
+    generator.writeStringField(
+        CONTENT, 
contentFile.content().name().toLowerCase(Locale.ROOT).replace('_', '-'));
     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"
+    generator.writeStringField(FILE_FORMAT, 
contentFile.format().name().toLowerCase(Locale.ROOT));

Review Comment:
   I think we may actually want to use `Locale.ENGLISH` here and a few lines 
above this



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