Search in sources :

Example 1 with RestructureExcludeFilterExecutorImpl

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

the class FilterUtil method getExcludeFilterExecuter.

/**
   * It gives filter executer based on columnar or column group
   *
   * @param dimColResolvedFilterInfo
   * @param segmentProperties
   * @return
   */
private static FilterExecuter getExcludeFilterExecuter(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 ExcludeFilterExecuterImpl(dimColResolvedFilterInfoCopyObject, segmentProperties);
        } else {
            return new RestructureExcludeFilterExecutorImpl(dimColResolvedFilterInfo, segmentProperties);
        }
    } else {
        return new ExcludeColGroupFilterExecuterImpl(dimColResolvedFilterInfo, segmentProperties);
    }
}
Also used : DimColumnResolvedFilterInfo(org.apache.carbondata.core.scan.filter.resolver.resolverinfo.DimColumnResolvedFilterInfo) ExcludeColGroupFilterExecuterImpl(org.apache.carbondata.core.scan.filter.executer.ExcludeColGroupFilterExecuterImpl) ExcludeFilterExecuterImpl(org.apache.carbondata.core.scan.filter.executer.ExcludeFilterExecuterImpl) RestructureExcludeFilterExecutorImpl(org.apache.carbondata.core.scan.filter.executer.RestructureExcludeFilterExecutorImpl) CarbonDimension(org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension)

Aggregations

CarbonDimension (org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension)1 ExcludeColGroupFilterExecuterImpl (org.apache.carbondata.core.scan.filter.executer.ExcludeColGroupFilterExecuterImpl)1 ExcludeFilterExecuterImpl (org.apache.carbondata.core.scan.filter.executer.ExcludeFilterExecuterImpl)1 RestructureExcludeFilterExecutorImpl (org.apache.carbondata.core.scan.filter.executer.RestructureExcludeFilterExecutorImpl)1 DimColumnResolvedFilterInfo (org.apache.carbondata.core.scan.filter.resolver.resolverinfo.DimColumnResolvedFilterInfo)1