Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2454#discussion_r200965517
--- Diff: core/src/main/java/org/apache/carbondata/core/indexstore/BlockletDataMapIndexStore.java ---
@@ -184,6 +185,23 @@ public BlockletDataMapIndexWrapper get(TableBlockIndexUniqueIdentifierWrapper id
*/
@Override public void invalidate(
TableBlockIndexUniqueIdentifierWrapper tableSegmentUniqueIdentifierWrapper) {
+ BlockletDataMapIndexWrapper blockletDataMapIndexWrapper =
+ getIfPresent(tableSegmentUniqueIdentifierWrapper);
+ if (null != blockletDataMapIndexWrapper) {
+ // clear the segmentProperties cache
+ List<BlockDataMap> dataMaps = blockletDataMapIndexWrapper.getDataMaps();
+ if (null != dataMaps) {
+ String segmentId =
+ tableSegmentUniqueIdentifierWrapper.getTableBlockIndexUniqueIdentifier().getSegmentId();
+ for (BlockDataMap dataMap : dataMaps) {
--- End diff --
this for loop will run ony once , change this to dataMap.get(0)
---