/** * Generate a query that calculates the even weight of the response cardinality of the given query. * * @param query Query to calculate the weighted response cardinality of * @param weight Weight to apply to each response row */ public WeightEvaluationQuery(DruidAggregationQuery<?> query, int weight) { super( makeInnerQuery(query, weight), AllGranularity.INSTANCE, Collections.<Dimension>emptyList(), (Filter) null, (Having) null, Collections.<Aggregation>singletonList(new LongSumAggregation("count", "count")), Collections.<PostAggregation>emptyList(), query.getIntervals(), query.getQueryType() == DefaultQueryType.GROUP_BY ? stripColumnsFromLimitSpec(query) : null ); }