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

Method appendElement

src/function/aggregate/collect.cpp:76–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76void CollectState::appendElement(ValueVector* input, uint32_t pos,
77 InMemOverflowBuffer* overflowBuffer) {
78 CollectListElement newElement{
79 overflowBuffer->allocateSpace(CollectListElement::size(input->dataType))};
80 newElement.setNextElement(nullptr);
81 input->copyToRowData(pos, newElement.getDataPtr(), overflowBuffer);
82
83 if (tail.valid()) {
84 tail.setNextElement(newElement);
85 } else {
86 DASSERT(!head.valid());
87 head = newElement;
88 }
89 tail = newElement;
90
91 ++listSize;
92}
93
94void CollectState::resetList() {
95 head = {};

Callers 1

updateSingleValueFunction · 0.80

Calls 6

allocateSpaceMethod · 0.80
setNextElementMethod · 0.80
copyToRowDataMethod · 0.80
getDataPtrMethod · 0.80
sizeFunction · 0.50
validMethod · 0.45

Tested by

no test coverage detected