Skip to content

Commit

Permalink
Fix summary iterator in grouping engine(apache#15658)
Browse files Browse the repository at this point in the history
This PR fixes the summary iterator to add aggregators in the correct position. The summary iterator is used when dims are not present, therefore the new change is identical to the old one, but seems more correct while reading.
  • Loading branch information
LakshSingla authored Jan 17, 2024
1 parent c27f5bf commit fc06f2d
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,10 @@ private static Iterator<ResultRow> summaryRowIterator(GroupByQuery q)
List<AggregatorFactory> aggSpec = q.getAggregatorSpecs();
ResultRow resultRow = ResultRow.create(q.getResultRowSizeWithPostAggregators());
for (int i = 0; i < aggSpec.size(); i++) {
resultRow.set(i, aggSpec.get(i).factorize(new AllNullColumnSelectorFactory()).get());
resultRow.set(
q.getResultRowAggregatorStart() + i,
aggSpec.get(i).factorize(new AllNullColumnSelectorFactory()).get()
);
}
Map<String, Object> map = resultRow.toMap(q);
for (int i = 0; i < q.getPostAggregatorSpecs().size(); i++) {
Expand Down

0 comments on commit fc06f2d

Please sign in to comment.