You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ka...@apache.org on 2017/04/14 12:54:54 UTC
[4/4] kylin git commit: KYLIN-2543 Still build dictionary for TopN
group
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/ca01e096
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ca01e096
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ca01e096
Branch: refs/heads/KYLIN-2506
Commit: ca01e096acc0338ac343a861253838e4591e01e0
Parents: 0018faf
Author: shaofengshi <sh...@apache.org>
Authored: Thu Apr 13 19:34:22 2017 +0800
Committer: kangkaisen <ka...@163.com>
Committed: Fri Apr 14 20:47:30 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/ca01e096/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);
}