shaofengshi commented on a change in pull request #543: KYLIN-3885: Build
dimension dictionary job costs too long when using Spark fact distinct
URL: https://github.com/apache/kylin/pull/543#discussion_r268918375
##########
File path:
core-dictionary/src/main/java/org/apache/kylin/dict/global/AppendTrieDictionaryBuilder.java
##########
@@ -86,7 +89,13 @@ public void addValue(String value) throws IOException {
}
checkState(sliceFileMap.firstKey().equals(AppendDictSliceKey.START_KEY), "first
key should be \"\", but got \"%s\"", sliceFileMap.firstKey());
- AppendDictSliceKey nextKey =
sliceFileMap.floorKey(AppendDictSliceKey.wrap(valueBytes));
+ AppendDictSliceKey key = AppendDictSliceKey.wrap(valueBytes);
+ if (preKey != null && key.compareTo(preKey) < 0) {
Review comment:
I'm afraid this check for each key will downgrade the performance of global
dict building.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services