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

Method partitionRows

bolt/exec/HashTable.cpp:1137–1161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1135
1136template <bool ignoreNullKeys>
1137void 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
1163template <bool ignoreNullKeys>
1164void HashTable<ignoreNullKeys>::buildJoinPartition(

Callers

nothing calls this directly

Calls 6

findPartitionFunction · 0.85
appendPartitionsMethod · 0.80
listRowsMethod · 0.45
dataMethod · 0.45
capacityMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected