[GitHub] [carbondata] KanakaKumar commented on a change in pull request #3181: [CARBONDATA-3356] Support decimal for json schema and Provide better exception for users to solve problem when carbonData DataSource read SDK files with varchar

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

[GitHub] [carbondata] KanakaKumar commented on a change in pull request #3181: [CARBONDATA-3356] Support decimal for json schema and Provide better exception for users to solve problem when carbonData DataSource read SDK files with varchar

GitBox
KanakaKumar commented on a change in pull request #3181: [CARBONDATA-3356]  Support decimal for json schema and Provide better exception for users to solve problem  when carbonData DataSource read SDK files with varchar
URL: https://github.com/apache/carbondata/pull/3181#discussion_r292779800
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/util/BlockletDataMapUtil.java
 ##########
 @@ -264,6 +264,16 @@ 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())) {
+            throw new RuntimeException("Datatype of the Column "
 
 Review comment:
   Please use IOException & add throws declaration to method so that callers are clear on how to handle it.
   Or
   I think all the callers are throwing exception. based on the flag. Instead you can return the custom message and throw Exception in caller if the msg is not empty.

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