| 1135 | |
| 1136 | template <bool ignoreNullKeys> |
| 1137 | void HashTable<ignoreNullKeys>::partitionRows( |
| 1138 | HashTable<ignoreNullKeys>& subtable, |
| 1139 | RowPartitions& rowPartitions) { |
| 1140 | constexpr int32_t kBatch = 1024; |
| 1141 | raw_vector<char*> rows(kBatch); |
| 1142 | raw_vector<uint64_t> hashes(kBatch); |
| 1143 | raw_vector<uint8_t> partitions(kBatch); |
| 1144 | RowContainerIterator iter; |
| 1145 | while (auto numRows = subtable.rows_->listRows( |
| 1146 | &iter, kBatch, RowContainer::kUnlimited, rows.data())) { |
| 1147 | hashRows(folly::Range<char**>(rows.data(), numRows), true, hashes); |
| 1148 | BOLT_DCHECK_EQ( |
| 1149 | 0, |
| 1150 | buildPartitionBounds_.capacity() % |
| 1151 | xsimd::batch<PartitionBoundIndexType>::size, |
| 1152 | "partition bounds must be padded to SIMD width"); |
| 1153 | for (auto i = 0; i < numRows; ++i) { |
| 1154 | auto index = bucketOffset(hashes[i]); |
| 1155 | partitions[i] = findPartition( |
| 1156 | index, buildPartitionBounds_.data(), buildPartitionBounds_.size()); |
| 1157 | } |
| 1158 | rowPartitions.appendPartitions( |
| 1159 | folly::Range<const uint8_t*>(partitions.data(), numRows)); |
| 1160 | } |
| 1161 | } |
| 1162 | |
| 1163 | template <bool ignoreNullKeys> |
| 1164 | void HashTable<ignoreNullKeys>::buildJoinPartition( |
nothing calls this directly
no test coverage detected