You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2016/10/24 02:40:18 UTC
[7/9] kylin git commit: KYLIN-2112 fix CI
KYLIN-2112 fix CI
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/242a72f5
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/242a72f5
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/242a72f5
Branch: refs/heads/yang21-hbase1.x
Commit: 242a72f5d62dc8653bdc6ac93e1393a58fdad3fa
Parents: c9216b1
Author: shaofengshi <sh...@apache.org>
Authored: Thu Oct 20 19:08:23 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Thu Oct 20 19:10:09 2016 +0800
----------------------------------------------------------------------
.../java/org/apache/kylin/measure/topn/TopNMeasureType.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/242a72f5/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
----------------------------------------------------------------------
diff --git a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
index 761c17f..12343b3 100644
--- a/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
+++ b/core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java
@@ -320,13 +320,14 @@ public class TopNMeasureType extends MeasureType<TopNCounter<ByteArray>> {
return;
if (sqlDigest.aggregations.size() > 1) {
- throw new IllegalStateException("When query with topN, only one metrics is allowed.");
+ return;
}
if (sqlDigest.aggregations.size() > 0) {
FunctionDesc origFunc = sqlDigest.aggregations.iterator().next();
if (origFunc.isSum() == false && origFunc.isCount() == false) {
- throw new IllegalStateException("When query with topN, only SUM function is allowed.");
+ logger.warn("When query with topN, only SUM/Count function is allowed.");
+ return;
}
logger.info("Rewrite function " + origFunc + " to " + topnFunc);
}