add a context to force 2 pass algorithm for topNs

This commit is contained in:
fjy 2014-05-20 10:42:37 -07:00
parent dd59b58208
commit 2906544c30
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);