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

Method copy

bolt/vector/BaseVector.cpp:736–757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

734 }
735
736 return ranges;
737}
738
739void BaseVector::copy(
740 const BaseVector* source,
741 const SelectivityVector& rows,
742 const vector_size_t* toSourceRow,
743 bool canCopyAll) {
744 if (!rows.hasSelections()) {
745 return;
746 }
747 std::vector<CopyRange> ranges;
748 if (toSourceRow == nullptr) {
749 BOLT_CHECK_GE(source->size(), rows.end());
750 ranges = toCopyRanges(rows);
751 } else {
752 ranges.reserve(rows.end());
753 rows.applyToSelected([&](vector_size_t row) {
754 const auto sourceRow = toSourceRow[row];
755 BOLT_DCHECK_GT(source->size(), sourceRow);
756 ranges.push_back({sourceRow, row, 1});
757 });
758 }
759 copyRanges(source, ranges);
760}

Callers 15

packageMethod · 0.45
setValueAtFunction · 0.45
addConstantFunction · 0.45
ensureWritableMethod · 0.45
copyFunction · 0.45
exportFlattenedVectorFunction · 0.45
exportToArrowFunction · 0.45
TEST_FFunction · 0.45
testCopyEncodedMethod · 0.45
testCopyFromAllNullsMethod · 0.45
TEST_FFunction · 0.45

Calls 7

copyRangesFunction · 0.85
hasSelectionsMethod · 0.80
applyToSelectedMethod · 0.80
sizeMethod · 0.45
endMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45

Tested by 12

TEST_FFunction · 0.36
testCopyEncodedMethod · 0.36
testCopyFromAllNullsMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
assertCopyableVectorFunction · 0.36
flattenMethod · 0.36
runShuffleMethod · 0.36