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

    https://github.com/apache/incubator-carbondata/pull/106#discussion_r76784836
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/scan/filter/FilterUtil.java ---
    @@ -623,9 +655,11 @@ public static DimColumnFilterInfo 
getFilterListForAllMembersRS(Expression expres
         if (null != dimColumnFilterInfo) {
           for (Integer surrogate : dimColumnFilterInfo.getFilterList()) {
             try {
    -          keys[carbonDimension.getKeyOrdinal()] = surrogate;
    -          filterValuesList
    -              .add(getMaskedKey(rangesForMaskedByte, 
blockLevelKeyGenerator.generateKey(keys)));
    +          if (surrogate <= 
dimColumnsCardinality[carbonDimension.getKeyOrdinal()]) {
    +            keys[carbonDimension.getKeyOrdinal()] = surrogate;
    +            filterValuesList
    +                .add(getMaskedKey(rangesForMaskedByte, 
blockLevelKeyGenerator.generateKey(keys)));
    +          }
    --- End diff --
    
    Please break the loop if it greater since the surrogates are always in 
sorted order here.


---
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