filter, queryIntervals.get(0), query.getVirtualColumns(), granularity, query.isDescending(),
public TopNQueryBuilder(final TopNQuery query) { this.dataSource = query.getDataSource(); this.virtualColumns = query.getVirtualColumns(); this.dimensionSpec = query.getDimensionSpec(); this.topNMetricSpec = query.getTopNMetricSpec(); this.threshold = query.getThreshold(); this.querySegmentSpec = query.getQuerySegmentSpec(); this.dimFilter = query.getDimensionsFilter(); this.granularity = query.getGranularity(); this.aggregatorSpecs = query.getAggregatorSpecs(); this.postAggregatorSpecs = query.getPostAggregatorSpecs(); this.context = query.getContext(); }
@Override public byte[] computeCacheKey(TopNQuery query) { final CacheKeyBuilder builder = new CacheKeyBuilder(TOPN_QUERY) .appendCacheable(query.getDimensionSpec()) .appendCacheable(query.getTopNMetricSpec()) .appendInt(query.getThreshold()) .appendCacheable(query.getGranularity()) .appendCacheable(query.getDimensionsFilter()) .appendCacheables(query.getAggregatorSpecs()) .appendCacheable(query.getVirtualColumns()); final List<PostAggregator> postAggregators = prunePostAggregators(query); if (!postAggregators.isEmpty()) { // Append post aggregators only when they are used as sort keys. // Note that appending an empty list produces a different cache key from not appending it. builder.appendCacheablesIgnoringOrder(postAggregators); } return builder.build(); }
query.initTopNAlgorithmSelector(selector); final ColumnCapabilities columnCapabilities = query.getVirtualColumns() .getColumnCapabilitiesWithFallback(adapter, dimension);
filter, queryIntervals.get(0), query.getVirtualColumns(), granularity, query.isDescending(),
public TopNQueryBuilder(final TopNQuery query) { this.dataSource = query.getDataSource(); this.virtualColumns = query.getVirtualColumns(); this.dimensionSpec = query.getDimensionSpec(); this.topNMetricSpec = query.getTopNMetricSpec(); this.threshold = query.getThreshold(); this.querySegmentSpec = query.getQuerySegmentSpec(); this.dimFilter = query.getDimensionsFilter(); this.granularity = query.getGranularity(); this.aggregatorSpecs = query.getAggregatorSpecs(); this.postAggregatorSpecs = query.getPostAggregatorSpecs(); this.context = query.getContext(); }
@Override public byte[] computeCacheKey(TopNQuery query) { final CacheKeyBuilder builder = new CacheKeyBuilder(TOPN_QUERY) .appendCacheable(query.getDimensionSpec()) .appendCacheable(query.getTopNMetricSpec()) .appendInt(query.getThreshold()) .appendCacheable(query.getGranularity()) .appendCacheable(query.getDimensionsFilter()) .appendCacheables(query.getAggregatorSpecs()) .appendCacheable(query.getVirtualColumns()); final List<PostAggregator> postAggregators = prunePostAggregators(query); if (!postAggregators.isEmpty()) { // Append post aggregators only when they are used as sort keys. // Note that appending an empty list produces a different cache key from not appending it. builder.appendCacheablesIgnoringOrder(postAggregators); } return builder.build(); }
query.initTopNAlgorithmSelector(selector); final ColumnCapabilities columnCapabilities = query.getVirtualColumns() .getColumnCapabilitiesWithFallback(adapter, dimension);