use of com.facebook.presto.common.predicate.TupleDomainFilter.BigintValuesUsingBitmask in project presto by prestodb.
the class OrcSelectiveRecordReader method scoreFilter.
private static int scoreFilter(Map<Subfield, TupleDomainFilter> filters) {
checkArgument(!filters.isEmpty());
if (filters.size() > 1) {
// Complex type column. Complex types are expensive!
return 1000;
}
Map.Entry<Subfield, TupleDomainFilter> filterEntry = Iterables.getOnlyElement(filters.entrySet());
if (!filterEntry.getKey().getPath().isEmpty()) {
// Complex type column. Complex types are expensive!
return 1000;
}
TupleDomainFilter filter = filterEntry.getValue();
if (filter instanceof BigintRange) {
if (((BigintRange) filter).isSingleValue()) {
// Integer equality. Generally cheap.
return 10;
}
return 50;
}
if (filter instanceof BigintValuesUsingHashTable || filter instanceof BigintValuesUsingBitmask || filter instanceof BigintMultiRange) {
return 50;
}
return 100;
}
Aggregations