RussellSpitzer commented on code in PR #12301:
URL: https://github.com/apache/iceberg/pull/12301#discussion_r1959968903


##########
api/src/main/java/org/apache/iceberg/FileFormat.java:
##########
@@ -60,9 +60,10 @@ public String addExtension(String filename) {
   public static FileFormat fromFileName(CharSequence filename) {
     for (FileFormat format : VALUES) {
       int extStart = filename.length() - format.ext.length();
-      if (Comparators.charSequences()
-              .compare(format.ext, filename.subSequence(extStart, 
filename.length()))
-          == 0) {
+      if (extStart > 0

Review Comment:
   I think if we did that we should just make a new version of the method, I 
don't think it's great to change the underlying perf semantics of the method in 
the API module. If it takes CharSequence we shouldn't change it to a string.



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to