carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject carbondata git commit: [CARBONDATA-2902][DataMap] Fix showing negative pruning result for explain command
Date Thu, 06 Sep 2018 12:30:22 GMT
Repository: carbondata
Updated Branches:
  refs/heads/master 50248f51b -> f04850f39


[CARBONDATA-2902][DataMap] Fix showing negative pruning result for explain command

#2676 used method ByteBuffer.getShort(int index) to get number of blocklets in block, but
it used wrong parameter. The index is index of byte instead of index of short. So it needs
to multiply bytes of short type

This closes #2697


Project: http://git-wip-us.apache.org/repos/asf/carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/carbondata/commit/f04850f3
Tree: http://git-wip-us.apache.org/repos/asf/carbondata/tree/f04850f3
Diff: http://git-wip-us.apache.org/repos/asf/carbondata/diff/f04850f3

Branch: refs/heads/master
Commit: f04850f39d8c42b96ee419140c9506f7df988075
Parents: 50248f5
Author: Manhua <kevinjmh@qq.com>
Authored: Thu Sep 6 17:09:21 2018 +0800
Committer: Jacky Li <jacky.likun@qq.com>
Committed: Thu Sep 6 20:29:19 2018 +0800

----------------------------------------------------------------------
 .../carbondata/core/indexstore/blockletindex/BlockDataMap.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/f04850f3/core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockDataMap.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockDataMap.java
b/core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockDataMap.java
index 01c8670..1938400 100644
--- a/core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockDataMap.java
+++ b/core/src/main/java/org/apache/carbondata/core/indexstore/blockletindex/BlockDataMap.java
@@ -551,7 +551,8 @@ public class BlockDataMap extends CoarseGrainDataMap
       // dummy value
       return 0;
     } else {
-      return ByteBuffer.wrap(getBlockletRowCountForEachBlock()).getShort(index);
+      return ByteBuffer.wrap(getBlockletRowCountForEachBlock()).getShort(
+          index * CarbonCommonConstants.SHORT_SIZE_IN_BYTE);
     }
   }
 


Mime
View raw message