Repository: kylin Updated Branches: refs/heads/tmp a184c51de -> 43d02f473
KYLIN-2974 zero joint group can lead to query error Signed-off-by: Li Yang <liy...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/f5e22801 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/f5e22801 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/f5e22801 Branch: refs/heads/tmp Commit: f5e22801704b31820f08ca1cae74ab685ec42ec0 Parents: a184c51 Author: yanghao3 <yangh...@xiaomi.com> Authored: Fri Oct 27 19:49:13 2017 +0800 Committer: Li Yang <liy...@apache.org> Committed: Sun Dec 3 14:22:17 2017 +0800 ---------------------------------------------------------------------- .../org/apache/kylin/cube/model/AggregationGroup.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/f5e22801/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java ---------------------------------------------------------------------- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java b/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java index d976c79..a26a4dd 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/model/AggregationGroup.java @@ -410,9 +410,13 @@ public class AggregationGroup implements Serializable { } } } - - cuboidID = cuboidID | Collections.min(getJoints(), Cuboid.cuboidSelectComparator); - Preconditions.checkState(isOnTree(cuboidID)); + if (getJoints().size() > 0) { + cuboidID = cuboidID | Collections.min(getJoints(), Cuboid.cuboidSelectComparator); + } + if (!isOnTree(cuboidID)) { + // kylin.cube.aggrgroup.is-mandatory-only-valid can be false + return null; + } } return cuboidID; }