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

    https://github.com/apache/carbondata/pull/2244#discussion_r184914643
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
 ---
    @@ -277,4 +298,30 @@ public DataMapMeta getMeta() {
         }
         return blocklets;
       }
    +
    +  @Override public void cache(TableBlockIndexUniqueIdentifier 
tableBlockIndexUniqueIdentifier,
    +      BlockletDataMapIndexWrapper blockletDataMapIndexWrapper) throws 
IOException, MemoryException {
    +    cache.put(tableBlockIndexUniqueIdentifier, 
blockletDataMapIndexWrapper);
    +  }
    +
    +  @Override
    +  public List<DataMapDistributable> getAllUncachedDistributables(
    +      List<DataMapDistributable> distributables) throws IOException {
    +    List<DataMapDistributable> distributablesToBeLoaded = new 
ArrayList<>(distributables.size());
    +    for (DataMapDistributable distributable : distributables) {
    +      Segment segment = distributable.getSegment();
    +      Set<TableBlockIndexUniqueIdentifier> 
tableBlockIndexUniqueIdentifiers =
    +          getTableBlockIndexUniqueIdentifiers(segment);
    +      // filter out the tableBlockIndexUniqueIdentifiers based on 
distributable
    +      TableBlockIndexUniqueIdentifier validIdentifier = BlockletDataMapUtil
    +          
.filterIdentifiersBasedOnDistributable(tableBlockIndexUniqueIdentifiers,
    +              (BlockletDataMapDistributable) distributable);
    +      ((BlockletDataMapDistributable) distributable)
    +          .setTableBlockIndexUniqueIdentifier(validIdentifier);
    --- End diff --
    
    Move this line inside below if check


---

Reply via email to