| 377 | } // namespace |
| 378 | |
| 379 | std::vector<Accumulator> GroupingSet::accumulators(bool excludeToIntermediate) { |
| 380 | std::vector<Accumulator> accumulators; |
| 381 | accumulators.reserve(aggregates_.size()); |
| 382 | for (auto& aggregate : aggregates_) { |
| 383 | if (!excludeToIntermediate || |
| 384 | !aggregate.function->supportsToIntermediate()) { |
| 385 | accumulators.push_back( |
| 386 | Accumulator{aggregate.function.get(), aggregate.intermediateType}); |
| 387 | } |
| 388 | } |
| 389 | |
| 390 | if (sortedAggregations_ != nullptr) { |
| 391 | accumulators.push_back(sortedAggregations_->accumulator()); |
| 392 | } |
| 393 | |
| 394 | for (const auto& aggregation : distinctAggregations_) { |
| 395 | if (aggregation != nullptr) { |
| 396 | accumulators.push_back(aggregation->accumulator()); |
| 397 | } |
| 398 | } |
| 399 | return accumulators; |
| 400 | } |
| 401 | |
| 402 | void GroupingSet::createHashTable() { |
| 403 | bool jitRowEqVectors = queryConfig_.enableJitRowEqVectors(); |
no test coverage detected