[GitHub] [carbondata] dhatchayani commented on a change in pull request #3407: [CARBONDATA-3542] Support Map data type reading through Hive

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

[GitHub] [carbondata] dhatchayani commented on a change in pull request #3407: [CARBONDATA-3542] Support Map data type reading through Hive

GitBox
dhatchayani commented on a change in pull request #3407: [CARBONDATA-3542] Support Map data type reading through Hive
URL: https://github.com/apache/carbondata/pull/3407#discussion_r339305368
 
 

 ##########
 File path: integration/hive/src/main/java/org/apache/carbondata/hive/CarbonDictionaryDecodeReadSupport.java
 ##########
 @@ -206,6 +208,46 @@ private ArrayWritable createStruct(Object obj, CarbonColumn carbonColumn) throws
     return null;
   }
 
+  /**
+   * Create the Map data for Map Datatype
+   *
+   * @param obj
+   * @param carbonColumn
+   * @return
+   * @throws IOException
+   */
+  private ArrayWritable createMap(Object obj, CarbonColumn carbonColumn) throws IOException {
+    Object[] objArray = (Object[]) obj;
+    List<CarbonDimension> childCarbonDimensions = null;
+    CarbonDimension mapDimension = null;
+    List<ArrayWritable> writablesList = new ArrayList<>();
+    if (carbonColumn.isDimension() && carbonColumn.getColumnSchema().getNumberOfChild() > 0) {
+      childCarbonDimensions = ((CarbonDimension) carbonColumn).getListOfChildDimensions();
+      mapDimension = childCarbonDimensions.get(0);
+    }
+    if (null != mapDimension) {
+      childCarbonDimensions = mapDimension.getListOfChildDimensions();
 
 Review comment:
   done

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