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

    https://github.com/apache/carbondata/pull/1376#discussion_r141535661
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataMapFactory.java
 ---
    @@ -78,8 +89,55 @@ public DataMapWriter createWriter(String segmentId) {
                 new TableBlockIndexUniqueIdentifier(identifier, segmentId, 
listFiles[i].getName()));
           }
         }
    +    return tableBlockIndexUniqueIdentifiers;
    +  }
     
    -    return cache.getAll(tableBlockIndexUniqueIdentifiers);
    +  /**
    +   * Get the blocklet detail information based on blockletid, blockid and 
segmentid. This method is
    +   * exclusively for BlockletDataMapFactory as detail information is only 
available in this default
    +   * datamap.
    +   */
    +  @Override
    +  public List<ExtendedBlocklet> getDetailedBlocklets(List<Blocklet> 
blocklets, String segmentId)
    +      throws IOException {
    +    List<ExtendedBlocklet> detailedBlocklets = new ArrayList<>();
    +    // If it is already detailed blocklet then type cast and return same
    +    if (blocklets.size() > 0 && blocklets.get(0) instanceof 
ExtendedBlocklet) {
    +      for (Blocklet blocklet : blocklets) {
    +        detailedBlocklets.add((ExtendedBlocklet) blocklet);
    +      }
    +      return detailedBlocklets;
    +    }
    +    List<TableBlockIndexUniqueIdentifier> identifiers =
    +        getTableBlockIndexUniqueIdentifiers(segmentId);
    +    // Retrieve each blocklets detail information from blocklet datamap
    +    for (Blocklet blocklet : blocklets) {
    +      detailedBlocklets.add(getDetailedBlocklet(identifiers, blocklet));
    +    }
    +    return detailedBlocklets;
    +  }
    +
    +  @Override
    +  public ExtendedBlocklet getDetailedBlocklet(Blocklet blocklet, String 
segmentId)
    --- End diff --
    
    ok


---

Reply via email to