| 356 | } |
| 357 | |
| 358 | std::unique_ptr<RowContainer> StreamingAggregation::makeRowContainer( |
| 359 | const std::vector<TypePtr>& groupingKeyTypes) { |
| 360 | std::vector<Accumulator> accumulators; |
| 361 | accumulators.reserve(aggregates_.size()); |
| 362 | for (const auto& aggregate : aggregates_) { |
| 363 | accumulators.emplace_back( |
| 364 | aggregate.function.get(), aggregate.intermediateType); |
| 365 | } |
| 366 | |
| 367 | if (sortedAggregations_ != nullptr) { |
| 368 | accumulators.push_back(sortedAggregations_->accumulator()); |
| 369 | } |
| 370 | |
| 371 | for (const auto& aggregation : distinctAggregations_) { |
| 372 | if (aggregation != nullptr) { |
| 373 | accumulators.push_back(aggregation->accumulator()); |
| 374 | } |
| 375 | } |
| 376 | |
| 377 | return std::make_unique<RowContainer>( |
| 378 | groupingKeyTypes, |
| 379 | !aggregationNode_->ignoreNullKeys(), |
| 380 | accumulators, |
| 381 | std::vector<TypePtr>{}, |
| 382 | false, |
| 383 | false, |
| 384 | false, |
| 385 | false, |
| 386 | false /*useListRowIndex*/, |
| 387 | pool()); |
| 388 | } |
| 389 | |
| 390 | void StreamingAggregation::initializeNewGroups(size_t numPrevGroups) { |
| 391 | if (numGroups_ == numPrevGroups) { |
nothing calls this directly
no test coverage detected