use of com.facebook.presto.operator.GroupByIdBlock in project presto by prestodb.
the class GroupByHashPageIndexer method indexPage.
@Override
public int[] indexPage(Page page) {
Work<GroupByIdBlock> work = hash.getGroupIds(page);
boolean done = work.process();
// TODO: this class does not yield wrt memory limit; enable it
verify(done);
GroupByIdBlock groupIds = work.getResult();
int[] indexes = new int[page.getPositionCount()];
for (int i = 0; i < indexes.length; i++) {
indexes[i] = toIntExact(groupIds.getGroupId(i));
}
return indexes;
}
use of com.facebook.presto.operator.GroupByIdBlock in project presto by prestodb.
the class BenchmarkGroupedTypedHistogram method testSharedGroupWithLargeBlocksRunner.
@Benchmark
public GroupedAccumulator testSharedGroupWithLargeBlocksRunner(Data data) {
GroupedAccumulator groupedAccumulator = data.groupedAccumulator;
for (int i = 0; i < data.numGroups; i++) {
GroupByIdBlock groupByIdBlock = data.groupByIdBlocks[i];
Page page = data.pages[i];
groupedAccumulator.addInput(groupByIdBlock, page);
}
return groupedAccumulator;
}
Aggregations