You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2019/04/21 07:59:40 UTC

[GitHub] [carbondata] akashrn5 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the issue when carbonData DataSource read SDK files with varchar

akashrn5 commented on a change in pull request #3181: [CARBONDATA-3356] Fix the issue when carbonData DataSource read SDK files with varchar
URL: https://github.com/apache/carbondata/pull/3181#discussion_r277157978
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/util/BlockletDataMapUtil.java
 ##########
 @@ -264,6 +264,14 @@ public static boolean isSameColumnAndDifferentDatatypeInSchema(
             .equalsIgnoreCase(tableColumnList.get(i).getColumnName()) && !indexFileColumnList.get(j)
             .getDataType().getName()
             .equalsIgnoreCase(tableColumnList.get(i).getDataType().getName())) {
+          if ("varchar".equalsIgnoreCase(indexFileColumnList.get(j).getDataType().getName()) &&
+              "string".equalsIgnoreCase(tableColumnList.get(i).getDataType().getName())) {
+            LOG.info("Datatype of the Column " + indexFileColumnList.get(j).getDataType().getName()
+                + " present in index file, is varchar and not same as datatype of the column " +
+                "with same name present in table, " +
+                "because carbon convert varchar of carbon to string of spark");
+            return true;
 
 Review comment:
   I think here you should not return , should continue with the loop as the for loop is not yet completed for all columns and other column might have different datatype.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services