[ 
https://issues.apache.org/jira/browse/CARBONDATA-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15358881#comment-15358881
 ] 

ASF GitHub Bot commented on CARBONDATA-29:
------------------------------------------

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

    https://github.com/apache/incubator-carbondata/pull/10#discussion_r69291144
  
    --- Diff: 
core/src/main/java/org/carbondata/scan/filter/executer/ExcludeFilterExecuterImpl.java
 ---
    @@ -166,34 +166,20 @@ private BitSet setFilterdIndexToBitSetWithColumnIndex(
       private BitSet setFilterdIndexToBitSet(FixedLengthDimensionDataChunk 
dimColumnDataChunk,
           int numerOfRows) {
         BitSet bitSet = new BitSet(numerOfRows);
    -    int startKey = 0;
    -    int last = 0;
    -    bitSet.flip(0, numerOfRows);
    -    int startIndex = 0;
    -    byte[][] filterValues = dimColumnExecuterInfo.getFilterKeys();
    -    for (int k = 0; k < filterValues.length; k++) {
    -      startKey = CarbonUtil
    -          .getFirstIndexUsingBinarySearch(dimColumnDataChunk, startIndex, 
numerOfRows - 1,
    -              filterValues[k], false);
    -      if (startKey < 0) {
    -        continue;
    -      }
    -      bitSet.flip(startKey);
    -      last = startKey;
    -      for (int j = startKey + 1; j < numerOfRows; j++) {
    -        if (ByteUtil.UnsafeComparer.INSTANCE
    -            .compareTo(dimColumnDataChunk.getCompleteDataChunk(), j * 
filterValues[k].length,
    -                filterValues[k].length, filterValues[k], 0, 
filterValues[k].length) == 0) {
    -          bitSet.flip(j);
    -          last++;
    -        } else {
    -          break;
    +    if (dimColumnDataChunk instanceof FixedLengthDimensionDataChunk) {
    +      FixedLengthDimensionDataChunk fixedChunk = 
(FixedLengthDimensionDataChunk) dimColumnDataChunk;
    +      int start = 0;
    +      bitSet.flip(0, numerOfRows);
    +      byte[][] filterValues = dimColumnExecuterInfo.getFilterKeys();
    +      for (int k = 0; k < filterValues.length; k++) {
    +        for (int j = start + 1; j < numerOfRows; j++) {
    --- End diff --
    
    I guess the logic `j = start + 1` seems wrong. It supposed to start from 0 
like `j = 0`


> Make inverted index can be configurable
> ---------------------------------------
>
>                 Key: CARBONDATA-29
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-29
>             Project: CarbonData
>          Issue Type: New Feature
>            Reporter: zhangshunyu
>
> We should make inverted index can be configurable, the user can use a 
> parameter to open/close this function during loading data.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to