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 2017/04/13 11:34:28 UTC

kylin git commit: KYLIN-2543 Still build dictionary for TopN group

Repository: kylin
Updated Branches:
  refs/heads/master 1caf19ab5 -> 821f59be3


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

Branch: refs/heads/master
Commit: 821f59be351f1f91a3e6bd0ef3a71e451504f9fe
Parents: 1caf19a
Author: shaofengshi <sh...@apache.org>
Authored: Thu Apr 13 19:34:22 2017 +0800
Committer: shaofengshi <sh...@apache.org>
Committed: Thu Apr 13 19:34:22 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/821f59be/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);
             }