use of com.linkedin.pinot.core.plan.FilterPlanNode in project pinot by linkedin.
the class BaseSumStarTreeIndexTest method computeSumUsingRawDocs.
/**
* Helper method to compute the sums using raw index.
* @param metricNames
* @param brokerRequest
*/
private Map<String, double[]> computeSumUsingRawDocs(IndexSegment segment, List<String> metricNames, BrokerRequest brokerRequest) {
FilterPlanNode planNode = new FilterPlanNode(segment, brokerRequest);
Operator rawOperator = planNode.run();
BlockDocIdIterator rawDocIdIterator = rawOperator.nextBlock().getBlockDocIdSet().iterator();
List<String> groupByColumns = Collections.EMPTY_LIST;
if (brokerRequest.isSetAggregationsInfo() && brokerRequest.isSetGroupBy()) {
groupByColumns = brokerRequest.getGroupBy().getColumns();
}
return computeSum(segment, rawDocIdIterator, metricNames, groupByColumns);
}
use of com.linkedin.pinot.core.plan.FilterPlanNode in project pinot by linkedin.
the class BaseHllStarTreeIndexTest method computeHllUsingRawDocs.
/**
* Helper method to compute the sums using raw index.
* @param metricNames
* @param brokerRequest
*/
private Map<String, long[]> computeHllUsingRawDocs(IndexSegment segment, List<String> metricNames, BrokerRequest brokerRequest) throws Exception {
FilterPlanNode planNode = new FilterPlanNode(segment, brokerRequest);
Operator rawOperator = planNode.run();
BlockDocIdIterator rawDocIdIterator = rawOperator.nextBlock().getBlockDocIdSet().iterator();
List<String> groupByColumns = Collections.EMPTY_LIST;
if (brokerRequest.isSetAggregationsInfo() && brokerRequest.isSetGroupBy()) {
groupByColumns = brokerRequest.getGroupBy().getColumns();
}
return computeHll(segment, rawDocIdIterator, metricNames, groupByColumns);
}
Aggregations