Search in sources :

Example 1 with StatisticsProvider

use of org.apache.drill.exec.expr.StatisticsProvider in project drill by apache.

the class FilterEvaluatorUtils method matches.

@SuppressWarnings("unchecked")
public static <T extends Comparable<T>> RowsMatch matches(FilterPredicate<T> parquetPredicate, Map<SchemaPath, ColumnStatistics<?>> columnsStatistics, long rowCount, TupleMetadata fileMetadata, Set<SchemaPath> schemaPathsInExpr) {
    if (parquetPredicate == null) {
        return RowsMatch.SOME;
    }
    @SuppressWarnings("rawtypes") StatisticsProvider<T> rangeExprEvaluator = new StatisticsProvider(columnsStatistics, rowCount);
    RowsMatch rowsMatch = parquetPredicate.matches(rangeExprEvaluator);
    if (rowsMatch == RowsMatch.ALL && isMetaNotApplicable(schemaPathsInExpr, fileMetadata)) {
        rowsMatch = RowsMatch.SOME;
    }
    return rowsMatch;
}
Also used : RowsMatch(org.apache.drill.exec.expr.stat.RowsMatch) StatisticsProvider(org.apache.drill.exec.expr.StatisticsProvider)

Aggregations

StatisticsProvider (org.apache.drill.exec.expr.StatisticsProvider)1 RowsMatch (org.apache.drill.exec.expr.stat.RowsMatch)1