Github user kumarvishal09 commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/137#discussion_r77953725
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/carbon/datastore/impl/btree/BTreeDataRefNodeFinder.java
 ---
    @@ -240,9 +240,16 @@ private int compareIndexes(IndexKey first, IndexKey 
second) {
                   firstNoDictionaryKeyBuffer.getShort(nonDictionaryKeyOffset + 
SHORT_SIZE_IN_BYTES);
               secondNodeDictionaryLength =
                   secondNoDictionaryKeyBuffer.getShort(nonDictionaryKeyOffset 
+ SHORT_SIZE_IN_BYTES);
    -          compareResult = ByteUtil.UnsafeComparer.INSTANCE
    -              .compareTo(first.getNoDictionaryKeys(), actualOffset, 
firstNoDcitionaryLength,
    -                  second.getNoDictionaryKeys(), actualOffset, 
secondNodeDictionaryLength);
    +          int minLength = Math.min(firstNoDcitionaryLength, 
secondNodeDictionaryLength);
    --- End diff --
    
    @gvramana Yes you right current logic has some problem we need to maintain 
offset of both the keys and when it is not the last key we need to substract 
the secondNodeDictionaryLength - actualOffset1 and 
firstNodeDictionaryLength-actualOffset. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to