xubo245 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_r291874985
##########
File path:
core/src/main/java/org/apache/carbondata/core/util/BlockletDataMapUtil.java
##########
@@ -257,13 +257,24 @@ public static boolean isCacheLevelBlock(CarbonTable
carbonTable) {
* name but with different dataType.
*/
public static boolean isSameColumnAndDifferentDatatypeInSchema(
- List<ColumnSchema> indexFileColumnList, List<ColumnSchema>
tableColumnList) {
+ List<ColumnSchema> indexFileColumnList, List<ColumnSchema>
tableColumnList)
+ throws IOException {
for (int i = 0; i < tableColumnList.size(); i++) {
for (int j = 0; j < indexFileColumnList.size(); j++) {
if (indexFileColumnList.get(j).getColumnName()
.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 IOException("Datatype of the Column "
Review comment:
optimized
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services