You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by sh...@apache.org on 2016/10/20 11:08:48 UTC

kylin git commit: KYLIN-2112 fix CI

Repository: kylin
Updated Branches:
  refs/heads/master bec4a888c -> 0eab5e0ad


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/0eab5e0a
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/0eab5e0a
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/0eab5e0a

Branch: refs/heads/master
Commit: 0eab5e0ad61f66601685b18ceca1ce7833ee1287
Parents: bec4a88
Author: shaofengshi <sh...@apache.org>
Authored: Thu Oct 20 19:08:23 2016 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Thu Oct 20 19:08:42 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/0eab5e0a/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 3173bc1..8c98672 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
@@ -315,13 +315,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);
             }