| 98 | } |
| 99 | |
| 100 | void 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 | |
| 112 | static std::unique_ptr<AggregateState> initialize() { |
| 113 | return std::make_unique<CollectState>(); |
no test coverage detected