LazyPrimitive and LazyBinaryPrimitive overrides hashcode method in
HIVE-949. But it failed to override equals() method. As a result, LazyMap and LazyBinaryMap will end up having multiple values for the same key. Both LazyMap and LazyBinaryMap uses LinkedHashMap, so the expected behaviour is to have a single value per unique key.
In the following code from LazyMap (LazyBinaryMap also has same code segment)
lazyKey.hashcode() returns the writable object's hashcode. The containsKeys() method of hash map (http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/HashMap.java#366) checks if the hashcode are same, if so then it uses equals() method to verify if the key already exists. Since LazyPrimitive does not override equals() method it falls back to use Object equals(). Object equals() will return true only if both object are exactly the same (this == obj).
So in the above code segment, even if the key already exists, the new value will be inserted with hash collision resulting in more number of map entries.