| 400 | } |
| 401 | |
| 402 | void GroupingSet::createHashTable() { |
| 403 | bool jitRowEqVectors = queryConfig_.enableJitRowEqVectors(); |
| 404 | if (ignoreNullKeys_) { |
| 405 | table_ = HashTable<true>::createForAggregation( |
| 406 | std::move(hashers_), |
| 407 | accumulators(false), |
| 408 | &pool_, |
| 409 | nullptr, |
| 410 | jitRowEqVectors); |
| 411 | } else { |
| 412 | table_ = HashTable<false>::createForAggregation( |
| 413 | std::move(hashers_), |
| 414 | accumulators(false), |
| 415 | &pool_, |
| 416 | nullptr, |
| 417 | jitRowEqVectors); |
| 418 | } |
| 419 | |
| 420 | RowContainer& rows = *table_->rows(); |
| 421 | initializeAggregates(aggregates_, rows, false); |
| 422 | |
| 423 | auto numColumns = rows.keyTypes().size() + aggregates_.size(); |
| 424 | |
| 425 | if (sortedAggregations_) { |
| 426 | sortedAggregations_->setAllocator(&rows.stringAllocator()); |
| 427 | |
| 428 | const auto rowColumn = rows.columnAt(numColumns); |
| 429 | sortedAggregations_->setOffsets( |
| 430 | rowColumn.offset(), |
| 431 | rowColumn.nullByte(), |
| 432 | rowColumn.nullMask(), |
| 433 | rows.rowSizeOffset()); |
| 434 | |
| 435 | ++numColumns; |
| 436 | } |
| 437 | |
| 438 | for (const auto& aggregation : distinctAggregations_) { |
| 439 | if (aggregation != nullptr) { |
| 440 | aggregation->setAllocator(&rows.stringAllocator()); |
| 441 | |
| 442 | const auto rowColumn = rows.columnAt(numColumns); |
| 443 | aggregation->setOffsets( |
| 444 | rowColumn.offset(), |
| 445 | rowColumn.nullByte(), |
| 446 | rowColumn.nullMask(), |
| 447 | rows.rowSizeOffset()); |
| 448 | ++numColumns; |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | lookup_ = std::make_unique<HashLookup>(table_->hashers(), jitRowEqVectors); |
| 453 | if (!isAdaptive_ && table_->hashMode() != BaseHashTable::HashMode::kHash) { |
| 454 | table_->forceGenericHashMode(); |
| 455 | } |
| 456 | |
| 457 | rowInfo_ = std::make_optional<RowFormatInfo>(table_->rows(), true); |
| 458 | LOG(INFO) << __FUNCTION__ << "=============RowContainer details " |
| 459 | << rows.toString() << ", alignment = " << rows.alignment(); |
nothing calls this directly
no test coverage detected