Search in sources :

Example 1 with IncludeFilterExecuterImpl

use of org.apache.carbondata.core.scan.filter.executer.IncludeFilterExecuterImpl in project carbondata by apache.

the class FilterUtil method getIncludeFilterExecuter.

/**
   * It gives filter executer based on columnar or column group
   *
   * @param dimColResolvedFilterInfo
   * @param segmentProperties
   * @return
   */
private static FilterExecuter getIncludeFilterExecuter(DimColumnResolvedFilterInfo dimColResolvedFilterInfo, SegmentProperties segmentProperties) {
    if (dimColResolvedFilterInfo.getDimension().isColumnar()) {
        CarbonDimension dimensionFromCurrentBlock = segmentProperties.getDimensionFromCurrentBlock(dimColResolvedFilterInfo.getDimension());
        if (null != dimensionFromCurrentBlock) {
            // update dimension and column index according to the dimension position in current block
            DimColumnResolvedFilterInfo dimColResolvedFilterInfoCopyObject = dimColResolvedFilterInfo.getCopyObject();
            dimColResolvedFilterInfoCopyObject.setDimension(dimensionFromCurrentBlock);
            dimColResolvedFilterInfoCopyObject.setColumnIndex(dimensionFromCurrentBlock.getOrdinal());
            return new IncludeFilterExecuterImpl(dimColResolvedFilterInfoCopyObject, segmentProperties);
        } else {
            return new RestructureIncludeFilterExecutorImpl(dimColResolvedFilterInfo, segmentProperties);
        }
    } else {
        return new IncludeColGroupFilterExecuterImpl(dimColResolvedFilterInfo, segmentProperties);
    }
}
Also used : DimColumnResolvedFilterInfo(org.apache.carbondata.core.scan.filter.resolver.resolverinfo.DimColumnResolvedFilterInfo) RestructureIncludeFilterExecutorImpl(org.apache.carbondata.core.scan.filter.executer.RestructureIncludeFilterExecutorImpl) IncludeColGroupFilterExecuterImpl(org.apache.carbondata.core.scan.filter.executer.IncludeColGroupFilterExecuterImpl) IncludeFilterExecuterImpl(org.apache.carbondata.core.scan.filter.executer.IncludeFilterExecuterImpl) CarbonDimension(org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension)

Aggregations

CarbonDimension (org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension)1 IncludeColGroupFilterExecuterImpl (org.apache.carbondata.core.scan.filter.executer.IncludeColGroupFilterExecuterImpl)1 IncludeFilterExecuterImpl (org.apache.carbondata.core.scan.filter.executer.IncludeFilterExecuterImpl)1 RestructureIncludeFilterExecutorImpl (org.apache.carbondata.core.scan.filter.executer.RestructureIncludeFilterExecutorImpl)1 DimColumnResolvedFilterInfo (org.apache.carbondata.core.scan.filter.resolver.resolverinfo.DimColumnResolvedFilterInfo)1