wombatu-kun commented on code in PR #18375:
URL: https://github.com/apache/hudi/pull/18375#discussion_r3198651888


##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieFileFormat.java:
##########
@@ -83,6 +99,20 @@ public static HoodieFileFormat fromFileExtension(String 
extension) {
     throw new IllegalArgumentException("Unknown file extension :" + extension);
   }
 
+  /**
+   * Returns the {@link HoodieFileFormat} matching the given file extension, 
or {@code null}
+   * if no match is found. Useful when the caller wants to handle unknown 
extensions without
+   * exception-based control flow.
+   */
+  public static HoodieFileFormat fromFileExtensionOrNull(String extension) {

Review Comment:
   Verified at HoodieFileFormat.java:93 — `fromFileExtension` now delegates to 
`fromFileExtensionOrNull` (line 106) and throws on null. Pushed at 2def3286, 
please resolve when convenient.



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

Reply via email to