Process sorted leaf data.
256300 {
256302 if (!collection.Count()) {
256303 return;
256304 }
256305
256306
256309
256310
256311 vector<column_t> index_ids(1,
window_tree.scan_cols.size() - 1);
256312 WindowCollectionChunkScanner scanner(collection, index_ids, block_begin);
256313 auto &payload_chunk = scanner.chunk;
256314
256315 idx_t row_idx = scanner.Scanned();
256316 for (auto block_curr = block_begin; block_curr < block_end; ++block_curr) {
256317 if (!scanner.Scan()) {
256318 break;
256319 }
256320 const auto count = payload_chunk.size();
256321 if (count == 0) {
256322 break;
256323 }
256324 auto &indices = payload_chunk.data[0];
256326 auto &sorted =
window_tree.mst32->LowestLevel();
256327 auto data = FlatVector::GetData<int32_t>(indices);
256328 std::copy(data, data + count, sorted.data() + row_idx);
256329 } else {
256330 auto &sorted =
window_tree.mst64->LowestLevel();
256331 auto data = FlatVector::GetData<int64_t>(indices);
256332 std::copy(data, data + count, sorted.data() + row_idx);
256333 }
256334 row_idx += count;
256335 }
256336}
WindowMergeSortTree & window_tree
The index tree we are building.
Definition duckdb.cpp:60181
idx_t build_task
Build task number.
Definition duckdb.cpp:60189
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237