| 353 | |
| 354 | namespace { |
| 355 | |
| 356 | void initializeAggregates( |
| 357 | const std::vector<AggregateInfo>& aggregates, |
| 358 | RowContainer& rows, |
| 359 | bool excludeToIntermediate) { |
| 360 | const auto numKeys = rows.keyTypes().size(); |
| 361 | int i = 0; |
| 362 | for (auto& aggregate : aggregates) { |
| 363 | auto& function = aggregate.function; |
| 364 | if (excludeToIntermediate && function->supportsToIntermediate()) { |
| 365 | continue; |
| 366 | } |
| 367 | function->setAllocator(&rows.stringAllocator()); |
| 368 | |
| 369 | const auto rowColumn = rows.columnAt(numKeys + i); |
| 370 | function->setOffsets( |
| 371 | rowColumn.offset(), |
| 372 | rowColumn.nullByte(), |
| 373 | rowColumn.nullMask(), |
| 374 | rows.rowSizeOffset()); |
| 375 | ++i; |
| 376 | } |
| 377 | } |
| 378 | } // namespace |
| 379 |
no test coverage detected