Github user ravipesala commented on a diff in the pull request: https://github.com/apache/carbondata/pull/1079#discussion_r125153736 --- Diff: core/src/main/java/org/apache/carbondata/core/scan/filter/executer/IncludeFilterExecuterImpl.java --- @@ -152,12 +261,31 @@ private BitSet setFilterdIndexToBitSet(DimensionColumnDataChunk dimensionColumnD public BitSet isScanRequired(byte[][] blkMaxVal, byte[][] blkMinVal) { BitSet bitSet = new BitSet(1); - byte[][] filterValues = dimColumnExecuterInfo.getFilterKeys(); - int columnIndex = dimColumnEvaluatorInfo.getColumnIndex(); - int blockIndex = segmentProperties.getDimensionOrdinalToBlockMapping().get(columnIndex); + byte[][] filterValues = null; + int columnIndex = 0; + int blockIndex = 0; + boolean isScanRequired = false; + + if (isDimensionPresentInCurrentBlock == true) { + filterValues = dimColumnExecuterInfo.getFilterKeys(); + columnIndex = dimColumnEvaluatorInfo.getColumnIndex(); + blockIndex = segmentProperties.getDimensionOrdinalToBlockMapping().get(columnIndex); + isScanRequired = + isScanRequired(blkMaxVal[blockIndex], blkMinVal[blockIndex], filterValues); + + } else if (isMeasurePresentInCurrentBlock) { + filterValues = msrColumnExecutorInfo.getFilterKeys(); + columnIndex = msrColumnEvaluatorInfo.getColumnIndex(); + // blockIndex = + // segmentProperties.getDimensionOrdinalToBlockMapping().get(columnIndex) + segmentProperties + // .getLastDimensionColOrdinal(); --- End diff -- remove commented code
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---