Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/2391#discussion_r200024653
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/indexstore/BlockletDataMapIndexStore.java
 ---
    @@ -81,8 +83,16 @@ public BlockletDataMapIndexWrapper 
get(TableBlockIndexUniqueIdentifierWrapper id
             SegmentIndexFileStore indexFileStore = new SegmentIndexFileStore();
             Set<String> filesRead = new HashSet<>();
             String segmentFilePath = identifier.getIndexFilePath();
    -        Map<String, BlockMetaInfo> carbonDataFileBlockMetaInfoMapping = 
BlockletDataMapUtil
    -            .createCarbonDataFileBlockMetaInfoMapping(segmentFilePath);
    +        if (segInfoCache == null) {
    +          segInfoCache = new HashMap<String, Map<String, BlockMetaInfo>>();
    --- End diff --
    
    Cache cannot be across queries as new files can be added in same segment 
path. So move cache to getAll and getDataMaps can take list of segments , so 
that cache can work across segments. 


---

Reply via email to