use of io.druid.query.topn.types.TopNColumnSelectorStrategy in project druid by druid-io.
the class DimExtractionTopNAlgorithm method scanAndAggregate.
@Override
public void scanAndAggregate(TopNParams params, Aggregator[][] rowSelector, Map<Comparable, Aggregator[]> aggregatesStore, int numProcessed) {
final Cursor cursor = params.getCursor();
final ColumnSelectorPlus<TopNColumnSelectorStrategy> selectorPlus = params.getSelectorPlus();
selectorPlus.getColumnSelectorStrategy().dimExtractionScanAndAggregate(query, selectorPlus.getSelector(), cursor, rowSelector, aggregatesStore);
}
use of io.druid.query.topn.types.TopNColumnSelectorStrategy in project druid by druid-io.
the class DimExtractionTopNAlgorithm method needsResultTypeConversion.
private boolean needsResultTypeConversion(TopNParams params) {
ColumnSelectorPlus<TopNColumnSelectorStrategy> selectorPlus = params.getSelectorPlus();
TopNColumnSelectorStrategy strategy = selectorPlus.getColumnSelectorStrategy();
return query.getDimensionSpec().getOutputType() != strategy.getValueType();
}
Aggregations