kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [12/17] kylin git commit: KYLIN-2543 Still build dictionary for TopN group
Date Mon, 17 Apr 2017 11:44:12 GMT
KYLIN-2543 Still build dictionary for TopN group


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

Branch: refs/heads/2.0.x-hbase0.98
Commit: ca0aa4f4c00e22c438305493310814016ea605b6
Parents: aa76405
Author: shaofengshi <shaofengshi@apache.org>
Authored: Thu Apr 13 19:34:22 2017 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Thu Apr 13 19:35:26 2017 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/measure/topn/TopNMeasureType.java    | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/ca0aa4f4/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 b7252a0..f90aab2 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
@@ -221,7 +221,11 @@ public class TopNMeasureType extends MeasureType<TopNCounter<ByteArray>>
{
         int start = (functionDesc.getParameter().isColumnType() == true) ? 1 : 0;
         for (int i = start; i < allCols.size(); i++) {
             TblColRef tblColRef = allCols.get(i);
-            String encoding = functionDesc.getConfiguration().get(CONFIG_ENCODING_PREFIX
+ tblColRef.getName());
+            String encoding = functionDesc.getConfiguration().get(CONFIG_ENCODING_PREFIX
+ tblColRef.getIdentity());
+            if (StringUtils.isEmpty(encoding)) {
+                // for backward compatibility
+                encoding = functionDesc.getConfiguration().get(CONFIG_ENCODING_PREFIX + tblColRef.getName());
+            }
             if (StringUtils.isEmpty(encoding) || DictionaryDimEnc.ENCODING_NAME.equals(encoding))
{
                 columnsNeedDict.add(tblColRef);
             }


Mime
View raw message