Indhumathi27 commented on a change in pull request #3701: [CARBONDATA-3770] 
Improve partition count star query performance
URL: https://github.com/apache/carbondata/pull/3701#discussion_r407351732
 
 

 ##########
 File path: 
core/src/main/java/org/apache/carbondata/core/datamap/DataMapStoreManager.java
 ##########
 @@ -130,6 +136,19 @@ private DataMapStoreManager() {
     return allDataMaps;
   }
 
+  /**
+   * It gives all segment indexes, a map contains segment file name to 
SegmentIndexMeta.
+   *
+   * @return
+   */
+  public Map<String, SegmentIndexMeta> getAllSegmentIndexes(String tableId) {
+    if (segmentIndexes.get(tableId) == null) {
+      Map<String, SegmentIndexMeta> segmentIndexMetaMap = new 
ConcurrentHashMap<>();
+      segmentIndexes.putIfAbsent(tableId, segmentIndexMetaMap);
 
 Review comment:
   Looks like each time, we are adding new map to `segmentIndexes`. where we 
actually add SegmentIndexMeta info to `segmentIndexes`?

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

Reply via email to