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;
}
Aggregations