mirror of https://github.com/apache/druid.git
Merge pull request #557 from metamx/context-force-2pass
Add a context to force 2 pass algorithm for topNs
This commit is contained in:
commit
93b92a76f7
|
@ -106,7 +106,7 @@ public class TopNQueryEngine
|
||||||
topNAlgorithm = new DimExtractionTopNAlgorithm(capabilities, query);
|
topNAlgorithm = new DimExtractionTopNAlgorithm(capabilities, query);
|
||||||
} else if (selector.isAggregateAllMetrics()) {
|
} else if (selector.isAggregateAllMetrics()) {
|
||||||
topNAlgorithm = new PooledTopNAlgorithm(capabilities, query, bufferPool);
|
topNAlgorithm = new PooledTopNAlgorithm(capabilities, query, bufferPool);
|
||||||
} else if (selector.isAggregateTopNMetricFirst()) {
|
} else if (selector.isAggregateTopNMetricFirst() || query.getContextValue("doAggregateTopNMetricFirst", false)) {
|
||||||
topNAlgorithm = new AggregateTopNMetricFirstAlgorithm(capabilities, query, bufferPool);
|
topNAlgorithm = new AggregateTopNMetricFirstAlgorithm(capabilities, query, bufferPool);
|
||||||
} else {
|
} else {
|
||||||
topNAlgorithm = new PooledTopNAlgorithm(capabilities, query, bufferPool);
|
topNAlgorithm = new PooledTopNAlgorithm(capabilities, query, bufferPool);
|
||||||
|
|
Loading…
Reference in New Issue