use of org.apache.hadoop.hive.ql.exec.KeyWrapper in project hive by apache.
the class VectorTopNKeyOperator method checkTopNFilterEfficiency.
public static void checkTopNFilterEfficiency(Map<KeyWrapper, TopNKeyFilter> filters, Set<KeyWrapper> disabledPartitions, float efficiencyThreshold, Logger log, long checkEfficiencyNumRows) {
Iterator<Map.Entry<KeyWrapper, TopNKeyFilter>> iterator = filters.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<KeyWrapper, TopNKeyFilter> each = iterator.next();
KeyWrapper partitionKey = each.getKey();
TopNKeyFilter filter = each.getValue();
log.debug("Checking TopN Filter efficiency {}, threshold: {}", filter, efficiencyThreshold);
if (filter.getTotal() >= checkEfficiencyNumRows && filter.forwardingRatio() >= efficiencyThreshold) {
log.info("Disabling TopN Filter {}", filter);
disabledPartitions.add(partitionKey);
}
}
}
Aggregations