You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by GitBox <gi...@apache.org> on 2020/11/14 03:48:48 UTC

[GitHub] [kylin] guangxuCheng commented on a change in pull request #1477: FIX KYLIN-4810

guangxuCheng commented on a change in pull request #1477:
URL: https://github.com/apache/kylin/pull/1477#discussion_r523370433



##########
File path: core-dictionary/src/main/java/org/apache/kylin/dict/TrieDictionaryBuilder.java
##########
@@ -108,11 +112,13 @@ private void addValueR(Node node, byte[] value, int start) {
             // if value fully matched within the current node
             if (i == n) {
                 // if equals to current node, just mark end of value
-                node.isEndOfValue = true;
+                if (!isSplitValue) {
+                    node.isEndOfValue = true;
+                }
             } else {
                 // otherwise, split the current node into two
                 Node c = new Node(BytesUtil.subarray(node.part, i, n), node.isEndOfValue, node.children);
-                node.reset(BytesUtil.subarray(node.part, 0, i), true);
+                node.reset(BytesUtil.subarray(node.part, 0, i), isSplitValue? false : true);

Review comment:
       `isSplitValue? false : true` can be simplified to `!isSplitValue`
   




----------------------------------------------------------------
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:
users@infra.apache.org