MCPcopy Create free account
hub / github.com/bytedance/bolt / buildJoinPartition

Method buildJoinPartition

bolt/exec/HashTable.cpp:1164–1186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1162
1163template <bool ignoreNullKeys>
1164void HashTable<ignoreNullKeys>::buildJoinPartition(
1165 uint8_t partition,
1166 const std::vector<std::unique_ptr<RowPartitions>>& rowPartitions,
1167 std::vector<char*>& overflow) {
1168 constexpr int32_t kBatch = 1024;
1169 raw_vector<char*> rows(kBatch);
1170 raw_vector<uint64_t> hashes(kBatch);
1171 int32_t numPartitions = 1 + otherTables_.size();
1172 TableInsertPartitionInfo partitionInfo{
1173 buildPartitionBounds_[partition],
1174 buildPartitionBounds_[partition + 1],
1175 overflow};
1176 for (auto i = 0; i < numPartitions; ++i) {
1177 auto* table = i == 0 ? this : otherTables_[i - 1].get();
1178 RowContainerIterator iter;
1179 while (const auto numRows = table->rows_->listPartitionRows(
1180 iter, partition, kBatch, *rowPartitions[i], rows.data())) {
1181 hashRows(folly::Range(rows.data(), numRows), false, hashes);
1182 insertForJoin(rows.data(), hashes.data(), numRows, &partitionInfo);
1183 table->numParallelBuildRows_ += numRows;
1184 }
1185 }
1186}
1187
1188template <bool ignoreNullKeys>
1189bool HashTable<ignoreNullKeys>::insertBatch(

Callers

nothing calls this directly

Calls 5

listPartitionRowsMethod · 0.80
RangeClass · 0.50
sizeMethod · 0.45
getMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected