You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by GitBox <gi...@apache.org> on 2020/03/19 11:17:53 UTC

[GitHub] [carbondata] Indhumathi27 commented on a change in pull request #3672: [CRBONDATA-3746] Support column chunk cache in reader

Indhumathi27 commented on a change in pull request #3672: [CRBONDATA-3746] Support column chunk cache in reader
URL: https://github.com/apache/carbondata/pull/3672#discussion_r394937107
 
 

 ##########
 File path: core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockletDataRefNode.java
 ##########
 @@ -133,35 +139,107 @@ public short blockletIndex() {
   }
 
   @Override
-  public DimensionRawColumnChunk[] readDimensionChunks(FileReader fileReader, int[][] blockIndexes)
+  public DimensionRawColumnChunk[] readDimensionChunks(FileReader fileReader, int[][] columnIndexes)
       throws IOException {
-    DimensionColumnChunkReader dimensionChunksReader = getDimensionColumnChunkReader(fileReader);
-    return dimensionChunksReader.readRawDimensionChunks(fileReader, blockIndexes);
+    TableBlockInfo blockInfo = blockInfos.get(index);
+    if (ColumnChunkCache.isEnabledForTable(tableId)) {
+      DimensionRawColumnChunk[] chunks = new DimensionRawColumnChunk[
+          blockInfo.getDetailInfo().getBlockletInfo().getDimensionChunkOffsets().size()];
+      for (int[] columnIndex : columnIndexes) {
+        int columnIndexStart = columnIndex[0];
+        int columnIndexEnd = columnIndex[1];
+        for (int j = columnIndexStart; j <= columnIndexEnd; j++) {
+          ColumnChunkCache.CacheKey key = new ColumnChunkCache.CacheKey(
 
 Review comment:
   Can extract getting cacheKey to a method. Seems, it is used in more places

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services