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:
[email protected]