You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ni...@apache.org on 2020/05/18 11:52:31 UTC
[kylin] 01/07: KYLIN-4325 fix TypeFlag for global dictionary field
in SelfDefineSortableKey
This is an automated email from the ASF dual-hosted git repository.
nic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 372f4ddf324dde8b1bc430710f7c3a09e7f30151
Author: Zhong, Yanghong <nj...@apache.org>
AuthorDate: Tue Mar 10 14:17:15 2020 +0800
KYLIN-4325 fix TypeFlag for global dictionary field in SelfDefineSortableKey
---
.../org/apache/kylin/engine/mr/steps/FactDistinctColumnsMapper.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsMapper.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsMapper.java
index 2c3bc8d..0fa12f9 100755
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsMapper.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsMapper.java
@@ -285,7 +285,11 @@ public class FactDistinctColumnsMapper<KEYIN> extends FactDistinctColumnsMapperB
tmpbuf.put(Bytes.toBytes(reducerIndex)[3]);
tmpbuf.put(valueBytes);
outputKey.set(tmpbuf.array(), 0, tmpbuf.position());
- sortableKey.init(outputKey, type);
+ if (cubeDesc.getDictionaryBuilderClass(allCols.get(colIndex)) == null) {
+ sortableKey.init(outputKey, type);
+ } else {
+ sortableKey.init(outputKey, (byte) 0);
+ }
context.write(sortableKey, EMPTY_TEXT);
// log a few rows for troubleshooting
if (rowCount < 10) {