| 8 | |
| 9 | struct ListReverse { |
| 10 | static inline void operation(common::list_entry_t& input, common::list_entry_t& result, |
| 11 | common::ValueVector& inputVector, common::ValueVector& resultVector) { |
| 12 | auto inputDataVector = common::ListVector::getDataVector(&inputVector); |
| 13 | ListVector::resizeDataVector(&resultVector, ListVector::getDataVectorSize(&inputVector)); |
| 14 | auto resultDataVector = common::ListVector::getDataVector(&resultVector); |
| 15 | result = input; // reverse does not change |
| 16 | for (auto i = 0u; i < input.size; i++) { |
| 17 | auto pos = input.offset + i; |
| 18 | auto reversePos = input.offset + input.size - 1 - i; |
| 19 | resultDataVector->copyFromVectorData(reversePos, inputDataVector, pos); |
| 20 | } |
| 21 | } |
| 22 | }; |
| 23 | |
| 24 | static std::unique_ptr<FunctionBindData> bindFunc(const ScalarBindFuncInput& input) { |
nothing calls this directly
no test coverage detected