| 9 | |
| 10 | struct ListDistinct { |
| 11 | static void operation(common::list_entry_t& input, common::list_entry_t& result, |
| 12 | common::ValueVector& inputVector, common::ValueVector& resultVector) { |
| 13 | auto numUniqueValues = ListUnique::appendListElementsToValueSet(input, inputVector); |
| 14 | result = common::ListVector::addList(&resultVector, numUniqueValues); |
| 15 | auto resultDataVector = common::ListVector::getDataVector(&resultVector); |
| 16 | auto resultDataVectorBuffer = |
| 17 | common::ListVector::getListValuesWithOffset(&resultVector, result, 0 /* offset */); |
| 18 | ListUnique::appendListElementsToValueSet(input, inputVector, nullptr, |
| 19 | [&resultDataVector, &resultDataVectorBuffer](common::ValueVector& dataVector, |
| 20 | uint64_t pos) -> void { |
| 21 | resultDataVector->copyFromVectorData(resultDataVectorBuffer, &dataVector, |
| 22 | dataVector.getData() + pos * dataVector.getNumBytesPerValue()); |
| 23 | resultDataVectorBuffer += dataVector.getNumBytesPerValue(); |
| 24 | }); |
| 25 | } |
| 26 | }; |
| 27 | |
| 28 | static std::unique_ptr<FunctionBindData> bindFunc(const ScalarBindFuncInput& input) { |
nothing calls this directly
no test coverage detected