Merge pull request #557 from metamx/context-force-2pass

Add a context to force 2 pass algorithm for topNs
This commit is contained in:
Gian Merlino 2014-05-20 10:46:30 -07:00
commit 93b92a76f7
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ public class TopNQueryEngine
topNAlgorithm = new DimExtractionTopNAlgorithm(capabilities, query);
} else if (selector.isAggregateAllMetrics()) {
topNAlgorithm = new PooledTopNAlgorithm(capabilities, query, bufferPool);
} else if (selector.isAggregateTopNMetricFirst()) {
} else if (selector.isAggregateTopNMetricFirst() || query.getContextValue("doAggregateTopNMetricFirst", false)) {
topNAlgorithm = new AggregateTopNMetricFirstAlgorithm(capabilities, query, bufferPool);
} else {
topNAlgorithm = new PooledTopNAlgorithm(capabilities, query, bufferPool);