[GitHub] [carbondata] akkio-97 opened a new pull request #3906: [WIP] Added test cases for hive read complex types and handled other issues

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] akkio-97 commented on a change in pull request #3906: [CARBONDATA-3968]Added test cases for hive read complex types and handled other issues

GitBox

akkio-97 commented on a change in pull request #3906:
URL: https://github.com/apache/carbondata/pull/3906#discussion_r484677864



##########
File path: processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/MapParserImpl.java
##########
@@ -73,9 +73,12 @@ public ArrayObject parse(Object data) {
 
   @Override
   public ArrayObject parseRaw(Object data) {
-    Object keyArray = ((Object[]) data)[0];
-    Object valueArray = ((Object[]) data)[1];
-    return new ArrayObject(new Object[]{child.parseRaw(keyArray), child.parseRaw(valueArray)});
+    Object[] keyValuePairs = ((Object[]) data);

Review comment:
       Here data is a list of key-value pairs. So both the variables keyArray and valueArray contained (key,value) pairs in each which was wrong. So made the required changes.




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


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] akkio-97 commented on a change in pull request #3906: [CARBONDATA-3968]Added test cases for hive read complex types and handled other issues

GitBox
In reply to this post by GitBox

akkio-97 commented on a change in pull request #3906:
URL: https://github.com/apache/carbondata/pull/3906#discussion_r484698276



##########
File path: integration/hive/src/main/java/org/apache/carbondata/hive/util/DataTypeUtil.java
##########
@@ -21,25 +21,31 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.metadata.datatype.DataType;
 import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.metadata.datatype.StructField;
 
+import org.apache.commons.lang.ArrayUtils;
+
 public class DataTypeUtil {
 
   public static DataType convertHiveTypeToCarbon(String type) throws SQLException {
     if ("string".equalsIgnoreCase(type) || type.startsWith("char")) {
       return DataTypes.STRING;
-    } else if ("varchar".equalsIgnoreCase(type)) {
+    } else if (!type.startsWith("map<") && !type.startsWith("array<") && !type.startsWith("struct<")

Review comment:
       made required changes, they are not required




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


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kunal642 commented on a change in pull request #3906: [CARBONDATA-3968]Added test cases for hive read complex types and handled other issues

GitBox
In reply to this post by GitBox

kunal642 commented on a change in pull request #3906:
URL: https://github.com/apache/carbondata/pull/3906#discussion_r484718004



##########
File path: processing/src/main/java/org/apache/carbondata/processing/loading/parser/impl/MapParserImpl.java
##########
@@ -73,9 +73,12 @@ public ArrayObject parse(Object data) {
 
   @Override
   public ArrayObject parseRaw(Object data) {
-    Object keyArray = ((Object[]) data)[0];
-    Object valueArray = ((Object[]) data)[1];
-    return new ArrayObject(new Object[]{child.parseRaw(keyArray), child.parseRaw(valueArray)});
+    Object[] keyValuePairs = ((Object[]) data);

Review comment:
       okay




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


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA1 commented on pull request #3906: [CARBONDATA-3968]Added test cases for hive read complex types and handled other issues

GitBox
In reply to this post by GitBox

CarbonDataQA1 commented on pull request #3906:
URL: https://github.com/apache/carbondata/pull/3906#issuecomment-688701556


   Build Success with Spark 2.3.4, Please check CI http://121.244.95.60:12545/job/ApacheCarbonPRBuilder2.3/3998/
   


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


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] CarbonDataQA1 commented on pull request #3906: [CARBONDATA-3968]Added test cases for hive read complex types and handled other issues

GitBox
In reply to this post by GitBox

CarbonDataQA1 commented on pull request #3906:
URL: https://github.com/apache/carbondata/pull/3906#issuecomment-688703629


   Build Success with Spark 2.4.5, Please check CI http://121.244.95.60:12545/job/ApacheCarbon_PR_Builder_2.4.5/2258/
   


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


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] asfgit closed pull request #3906: [CARBONDATA-3968]Added test cases for hive read complex types and handled other issues

GitBox
In reply to this post by GitBox

asfgit closed pull request #3906:
URL: https://github.com/apache/carbondata/pull/3906


   


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


Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] kunal642 commented on pull request #3906: [CARBONDATA-3968]Added test cases for hive read complex types and handled other issues

GitBox
In reply to this post by GitBox

kunal642 commented on pull request #3906:
URL: https://github.com/apache/carbondata/pull/3906#issuecomment-688795296


   LGTM


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


12