| 941 | } |
| 942 | |
| 943 | void HashBuild::computeSpillPartitions(const RowVectorPtr& input) { |
| 944 | if (hashes_.size() < activeRows_.end()) { |
| 945 | hashes_.resize(activeRows_.end()); |
| 946 | } |
| 947 | const auto& hashers = table_->hashers(); |
| 948 | for (auto i = 0; i < hashers.size(); ++i) { |
| 949 | auto& hasher = hashers[i]; |
| 950 | if (hasher->channel() != kConstantChannel) { |
| 951 | hashers[i]->hash(activeRows_, i > 0, hashes_); |
| 952 | } else { |
| 953 | hashers[i]->hashPrecomputed(activeRows_, i > 0, hashes_); |
| 954 | } |
| 955 | } |
| 956 | |
| 957 | spillPartitions_.resize(input->size()); |
| 958 | for (auto i = 0; i < spillPartitions_.size(); ++i) { |
| 959 | spillPartitions_[i] = spiller_->hashBits().partition(hashes_[i]); |
| 960 | } |
| 961 | } |
| 962 | |
| 963 | void HashBuild::spillPartition( |
| 964 | uint32_t partition, |