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

    https://github.com/apache/carbondata/pull/2822#discussion_r227000087
  
    --- Diff: 
core/src/main/java/org/apache/carbondata/core/scan/result/vector/impl/directread/ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex.java
 ---
    @@ -0,0 +1,258 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.carbondata.core.scan.result.vector.impl.directread;
    +
    +import java.math.BigDecimal;
    +import java.util.BitSet;
    +
    +import org.apache.carbondata.core.metadata.datatype.DataType;
    +import org.apache.carbondata.core.metadata.datatype.DataTypes;
    +import org.apache.carbondata.core.metadata.datatype.DecimalType;
    +import org.apache.carbondata.core.scan.result.vector.CarbonColumnVector;
    +import 
org.apache.carbondata.core.scan.result.vector.impl.CarbonColumnVectorImpl;
    +
    +/**
    + * Column vector for column pages which has delete delta and inverted 
index, so it uses delta biset
    + * to filter out data and use inverted index before filling to actual 
vector
    + */
    +class ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex
    +    extends AbstractCarbonColumnarVector implements ConvertableVector {
    +
    +  private BitSet deletedRows;
    +
    +  private int[] invertedIndex;
    +
    +  private CarbonColumnVectorImpl carbonColumnVector;
    +
    +  private CarbonColumnVector columnVector;
    +
    +  private int precision;
    +
    +  private BitSet nullBits;
    +
    +  private boolean isnullBitsExists;
    +
    +  public ColumnarVectorWrapperDirectWithDeleteDeltaAndInvertedIndex(
    +      CarbonColumnVector vectorWrapper, BitSet deletedRows, int[] 
invertedIndex, BitSet nullBits,
    +      boolean isnullBitsExists) {
    +    this.deletedRows = deletedRows;
    +    this.invertedIndex = invertedIndex;
    +    carbonColumnVector = new CarbonColumnVectorImpl(invertedIndex.length, 
vectorWrapper.getType());
    --- End diff --
    
    If feasible try to merge this code with class 
`ColumnarVectorWrapperDirectWithInvertedIndex`. Either one can be extended from 
another or a flag can be used to distinguish. I think it is better to extend, 
that will keep the code clean


---

Reply via email to