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

Method writeToVector

src/function/aggregate/collect.cpp:100–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void CollectState::writeToVector(common::ValueVector* outputVector, uint64_t pos) {
101 auto listEntry = common::ListVector::addList(outputVector, listSize);
102 outputVector->setValue<common::list_entry_t>(pos, listEntry);
103 auto outputDataVector = common::ListVector::getDataVector(outputVector);
104 CollectListElement curElement = head;
105 for (auto i = 0u; i < listEntry.size; i++) {
106 DASSERT(curElement.valid());
107 outputDataVector->copyFromRowData(listEntry.offset + i, curElement.getDataPtr());
108 curElement = curElement.getNextElement();
109 }
110}
111
112static std::unique_ptr<AggregateState> initialize() {
113 return std::make_unique<CollectState>();

Calls 6

addListFunction · 0.85
copyFromRowDataMethod · 0.80
getDataPtrMethod · 0.80
getNextElementMethod · 0.80
getDataVectorFunction · 0.50
validMethod · 0.45

Tested by

no test coverage detected