Fix summary iterator in grouping engine(#15658)

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.
This commit is contained in:
Laksh Singla 2024-01-17 20:43:45 +05:30 committed by GitHub
parent c27f5bf52f
commit fc06f2d075
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -950,7 +950,10 @@ public class GroupingEngine
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++) {