MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / allocateChunk

Method allocateChunk

src/common/data_chunk/data_chunk_collection.cpp:42–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void DataChunkCollection::allocateChunk(const DataChunk& chunk) {
43 if (chunks.empty()) {
44 types.reserve(chunk.getNumValueVectors());
45 for (auto vectorIdx = 0u; vectorIdx < chunk.getNumValueVectors(); vectorIdx++) {
46 types.push_back(chunk.getValueVector(vectorIdx).dataType.copy());
47 }
48 }
49 DataChunk newChunk(types.size(), std::make_shared<DataChunkState>());
50 for (auto i = 0u; i < types.size(); i++) {
51 newChunk.insert(i, std::make_shared<ValueVector>(types[i].copy(), mm));
52 }
53 chunks.push_back(std::move(newChunk));
54}
55
56} // namespace common
57} // namespace lbug

Callers

nothing calls this directly

Calls 7

emptyMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45
copyMethod · 0.45
getValueVectorMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected