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


##########
core/src/main/java/org/apache/iceberg/ContentFileParser.java:
##########
@@ -345,4 +347,24 @@ private static PartitionData partitionFromJson(
 
     return partitionData;
   }
+
+  private static FileContent fileContentFromJson(String content) {
+    Preconditions.checkArgument(content != null, "Invalid file content: null");
+    switch (content) {

Review Comment:
   Alternatively, we can open the deserialization to ignore casing.
   
   ```
   
   private static FileContent fileContentFromJson(String jsonConttent) {
     String contentValue = jsonConttent.replace('-', 
'_').toUpperCase(Locale.ROOT);
     try {
       return FileContent.valueOf(contentValue);
     } catch (IllegalArgumentException e) {
       throw new IllegalArgumentException(String.format("Invalid file content: 
%s", content), e);
     }
   }
   
   ```



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