You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/06/21 12:44:44 UTC

[GitHub] [iceberg] uncleGen commented on a change in pull request #2717: fix inconsistent case type of field name

uncleGen commented on a change in pull request #2717:
URL: https://github.com/apache/iceberg/pull/2717#discussion_r655343274



##########
File path: core/src/main/java/org/apache/iceberg/data/GenericRecord.java
##########
@@ -28,16 +28,16 @@
 import org.apache.iceberg.StructLike;
 import org.apache.iceberg.relocated.com.google.common.base.Objects;
 import org.apache.iceberg.relocated.com.google.common.base.Preconditions;
-import org.apache.iceberg.relocated.com.google.common.collect.Maps;
 import org.apache.iceberg.types.Types;
 import org.apache.iceberg.types.Types.StructType;
+import org.apache.iceberg.util.CaseInsensitiveMap;
 
 public class GenericRecord implements Record, StructLike {
   private static final LoadingCache<StructType, Map<String, Integer>> NAME_MAP_CACHE =
       Caffeine.newBuilder()
       .weakKeys()
       .build(struct -> {
-        Map<String, Integer> idToPos = Maps.newHashMap();
+        Map<String, Integer> idToPos = new CaseInsensitiveMap<>();

Review comment:
       Make sense, I will consider using your suggestion after this commit can be accept. 




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

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



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