sl255051 commented on code in PR #10678:
URL: https://github.com/apache/iceberg/pull/10678#discussion_r1702992594


##########
api/src/main/java/org/apache/iceberg/types/TypeUtil.java:
##########
@@ -182,11 +181,10 @@ public static Map<Integer, String> indexQuotedNameById(
   }
 
   public static Map<String, Integer> indexByLowerCaseName(Types.StructType 
struct) {
-    Map<String, Integer> indexByLowerCaseName = Maps.newHashMap();
+    ImmutableMap.Builder<String, Integer> builder = ImmutableMap.builder();
     indexByName(struct)
-        .forEach(
-            (name, integer) -> 
indexByLowerCaseName.put(name.toLowerCase(Locale.ROOT), integer));
-    return indexByLowerCaseName;
+        .forEach((name, integer) -> builder.put(name.toLowerCase(Locale.ROOT), 
integer));
+    return builder.buildOrThrow();

Review Comment:
   I've made the change you proposed



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