Repository: kylin Updated Branches: refs/heads/KYLIN-242-new b8eed3f61 -> b228d5124
bug fix Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/b228d512 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/b228d512 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/b228d512 Branch: refs/heads/KYLIN-242-new Commit: b228d512492ac0d501a5414ce48d25d90140f541 Parents: b8eed3f Author: honma <ho...@ebay.com> Authored: Wed Dec 2 16:36:23 2015 +0800 Committer: honma <ho...@ebay.com> Committed: Wed Dec 2 16:36:23 2015 +0800 ---------------------------------------------------------------------- .../src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java | 8 ++++---- .../apache/kylin/storage/hbase/cube/v2/CubeStorageQuery.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/b228d512/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java ---------------------------------------------------------------------- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java index ad6b040..27e00ef 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/cuboid/Cuboid.java @@ -153,7 +153,7 @@ public class Cuboid implements Comparable<Cuboid> { } } - if (cuboidID != 0) { + if ((cuboidID & ~agg.getMandatoryColumnMask()) != 0) { return cuboidID; } else { // no column, add one column @@ -167,7 +167,7 @@ public class Cuboid implements Comparable<Cuboid> { })); if (nonJointNonHierarchy != 0) { //there exists dim that does not belong to any joint or any hierarchy, that's perfect - return Long.lowestOneBit(nonJointNonHierarchy); + return cuboidID | Long.lowestOneBit(nonJointNonHierarchy); } else { //choose from a hierarchy that does not intersect with any joint dim, only check level 1 long allJointDims = agg.getJointDimsMask(); @@ -175,13 +175,13 @@ public class Cuboid implements Comparable<Cuboid> { for (HierarchyMask hierarchyMask : agg.getHierarchyMasks()) { long dim = hierarchyMask.allMasks[index]; if ((nonJointDims & allJointDims) == 0) { - return dim; + return cuboidID | dim; } } } } - return Collections.min(agg.getJoints(), cuboidSelectComparator); + return cuboidID | Collections.min(agg.getJoints(), cuboidSelectComparator); } } http://git-wip-us.apache.org/repos/asf/kylin/blob/b228d512/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeStorageQuery.java ---------------------------------------------------------------------- diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeStorageQuery.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeStorageQuery.java index 0c8c3bd..74dfd25 100644 --- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeStorageQuery.java +++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/cube/v2/CubeStorageQuery.java @@ -103,7 +103,7 @@ public class CubeStorageQuery implements ICachableStorageQuery { try { scanner = new CubeSegmentScanner(cubeSeg, cuboid, dimensionsD, groupsD, metrics, filterD, !isExactAggregation); } catch (NotEnoughGTInfoException e) { - logger.info("Cannot construct Segment {}'s GTInfo, this may due to empty segment or broken metadata"); + logger.info("Cannot construct Segment {}'s GTInfo, this may due to empty segment or broken metadata", cubeSeg); continue; } scanners.add(scanner);