From 3fb42251d90cea242b43413842bd32be8042cd4f Mon Sep 17 00:00:00 2001 From: nishantmonu51 Date: Tue, 22 Apr 2014 11:25:21 +0530 Subject: [PATCH] calculate postAggs while pulling from cache --- .../io/druid/query/topn/TopNQueryQueryToolChest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java b/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java index f290fc29e8a..01b5dd86bf6 100644 --- a/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java +++ b/processing/src/main/java/io/druid/query/topn/TopNQueryQueryToolChest.java @@ -249,6 +249,11 @@ public class TopNQueryQueryToolChest extends QueryToolChest, Object, TopNQuery>() { private final List aggs = query.getAggregatorSpecs(); + private final List postAggs = AggregatorUtil.pruneDependentPostAgg( + query.getPostAggregatorSpecs(), + query.getTopNMetricSpec() + .getMetricName(query.getDimensionSpec()) + ); @Override public byte[] computeCacheKey(TopNQuery query) @@ -338,6 +343,10 @@ public class TopNQueryQueryToolChest extends QueryToolChest