ravipesala commented on a change in pull request #3288: [CARBONDATA-3437] 
Changed implementation of Map datatype
URL: https://github.com/apache/carbondata/pull/3288#discussion_r296585273
 
 

 ##########
 File path: 
processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/MapParserImpl.java
 ##########
 @@ -44,12 +44,13 @@ public MapParserImpl(String delimiter, String nullFormat, 
String keyValueDelimit
         String[] split = pattern.split(value, -1);
         if (ArrayUtils.isNotEmpty(split)) {
           ArrayList<Object> array = new ArrayList<>();
-          Set<Object> set = new HashSet<>();
+          Map<Object, String> map = new HashMap<>();
           for (int i = 0; i < split.length; i++) {
             Object currKey = split[i].split(keyValueDelimiter)[0];
-            if (set.add(currKey)) {
-              array.add(child.parse(split[i]));
-            }
+            map.put(currKey, split[i]);
+          }
+          for (Map.Entry<Object, String> entry : map.entrySet()) {
 
 Review comment:
   @manishnalla1994 what sorted order are you referring to? Please check the 
behaviour of hive whether they maintain the insertion order or not.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to