qiuchenjian commented on a change in pull request #3121: [CARBONDATA-3287]Remove the validation for same schema in a location and fix drop datamap issue
URL:
https://github.com/apache/carbondata/pull/3121#discussion_r255292478
##########
File path: core/src/main/java/org/apache/carbondata/core/datamap/DataMapStoreManager.java
##########
@@ -322,6 +322,16 @@ public TableDataMap getDataMap(CarbonTable table, DataMapSchema dataMapSchema) {
tableIndices = allDataMaps.get(tableUniqueName);
}
}
+ // in case of fileformat or sdk, when table is dropped or schema is changed the datamaps are
+ // not cleared, they need to be cleared by using API, so compare the columns, if not same, clear
+ // the datamaps on that table
+ if (allDataMaps.size() > 0 && null != allDataMaps.get(tableUniqueName)
Review comment:
better to use CollectionUtils.isEmpty(allDataMaps.get(tableUniqueName))
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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