Search in sources :

Example 1 with FilterOptimizerBasic

use of org.apache.carbondata.core.scan.filter.intf.FilterOptimizerBasic in project carbondata by apache.

the class CarbonInputFormatUtil method processFilterExpression.

public static void processFilterExpression(Expression filterExpression, CarbonTable carbonTable) {
    List<CarbonDimension> dimensions = carbonTable.getDimensionByTableName(carbonTable.getFactTableName());
    List<CarbonMeasure> measures = carbonTable.getMeasureByTableName(carbonTable.getFactTableName());
    QueryModel.processFilterExpression(filterExpression, dimensions, measures);
    if (null != filterExpression) {
        // Optimize Filter Expression and fit RANGE filters is conditions apply.
        FilterOptimizer rangeFilterOptimizer = new RangeFilterOptmizer(new FilterOptimizerBasic(), filterExpression);
        rangeFilterOptimizer.optimizeFilter();
    }
}
Also used : CarbonMeasure(org.apache.carbondata.core.metadata.schema.table.column.CarbonMeasure) FilterOptimizer(org.apache.carbondata.core.scan.filter.intf.FilterOptimizer) RangeFilterOptmizer(org.apache.carbondata.core.scan.filter.optimizer.RangeFilterOptmizer) FilterOptimizerBasic(org.apache.carbondata.core.scan.filter.intf.FilterOptimizerBasic) CarbonDimension(org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension)

Aggregations

CarbonDimension (org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension)1 CarbonMeasure (org.apache.carbondata.core.metadata.schema.table.column.CarbonMeasure)1 FilterOptimizer (org.apache.carbondata.core.scan.filter.intf.FilterOptimizer)1 FilterOptimizerBasic (org.apache.carbondata.core.scan.filter.intf.FilterOptimizerBasic)1 RangeFilterOptmizer (org.apache.carbondata.core.scan.filter.optimizer.RangeFilterOptmizer)1