| 2021 | continue; |
| 2022 | } |
| 2023 | auto intermediate = |
| 2024 | std::vector<VectorPtr>({input->childAt(i + keyChannels_.size())}); |
| 2025 | aggregates_[i].function->addIntermediateResults( |
| 2026 | rows.data(), mergeSelection_, intermediate, false); |
| 2027 | } |
| 2028 | |
| 2029 | if (sortedAggregations_ != nullptr) { |
| 2030 | const auto& vector = |
| 2031 | input->childAt(aggregates_.size() + keyChannels_.size()); |
| 2032 | for (auto i = 0; i < input->size(); i++) { |
| 2033 | // TODO addSpillInput support batch input |
| 2034 | sortedAggregations_->addSingleGroupSpillInput(rows[i], vector, i); |
| 2035 | } |
| 2036 | } |
| 2037 | } |
| 2038 | |
| 2039 | void GroupingSet::abandonPartialAggregation() { |
| 2040 | BOLT_CHECK(!hasSpilled()) |
| 2041 | |
| 2042 | abandonedPartialAggregation_ = true; |
| 2043 | allSupportToIntermediate_ = true; |
| 2044 | for (auto& aggregate : aggregates_) { |
| 2045 | if (!aggregate.function->supportsToIntermediate()) { |
| 2046 | allSupportToIntermediate_ = false; |
| 2047 | } |
| 2048 | } |
| 2049 | |
| 2050 | BOLT_CHECK_EQ(table_->rows()->numRows(), 0); |
| 2051 | intermediateRows_ = std::make_unique<RowContainer>( |
| 2052 | table_->rows()->keyTypes(), |
no test coverage detected