[GitHub] [carbondata] manishnalla1994 commented on a change in pull request #3288: [CARBONDATA-3437] Changed implementation of Map datatype

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] manishnalla1994 commented on a change in pull request #3288: [CARBONDATA-3437] Changed implementation of Map datatype

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

 ##########
 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:
   Here sorted order means the keys will be sorted.

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


With regards,
Apache Git Services