Repository: kylin Updated Branches: refs/heads/2.0.x aa7640539 -> ca0aa4f4c
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 Commit: ca0aa4f4c00e22c438305493310814016ea605b6 Parents: aa76405 Author: shaofengshi <shaofeng...@apache.org> Authored: Thu Apr 13 19:34:22 2017 +0800 Committer: shaofengshi <shaofeng...@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); }