| 14 | }; |
| 15 | |
| 16 | void ListToString::operation(string_t& delim, list_entry_t& input, string_t& result, |
| 17 | ValueVector& /*delimVector*/, ValueVector& inputVector, ValueVector& resultVector) { |
| 18 | std::string resultStr = ""; |
| 19 | bool outputDelim = false; |
| 20 | if (input.size != 0) { |
| 21 | auto dataVector = ListVector::getDataVector(&inputVector); |
| 22 | if (!dataVector->isNull(input.offset)) { |
| 23 | resultStr += TypeUtils::entryToString(dataVector->dataType, |
| 24 | ListVector::getListValuesWithOffset(&inputVector, input, 0 /* offset */), |
| 25 | dataVector); |
| 26 | outputDelim = true; |
| 27 | } |
| 28 | for (auto i = 1u; i < input.size; i++) { |
| 29 | if (dataVector->isNull(input.offset + i)) { |
| 30 | continue; |
| 31 | } |
| 32 | if (outputDelim) { |
| 33 | resultStr += delim.getAsString(); |
| 34 | } |
| 35 | outputDelim = true; |
| 36 | resultStr += TypeUtils::entryToString(dataVector->dataType, |
| 37 | ListVector::getListValuesWithOffset(&inputVector, input, i), dataVector); |
| 38 | } |
| 39 | } |
| 40 | StringVector::addString(&resultVector, result, resultStr); |
| 41 | } |
| 42 | |
| 43 | static std::unique_ptr<FunctionBindData> bindFunc(const ScalarBindFuncInput& input) { |
| 44 | std::vector<LogicalType> paramTypes; |
nothing calls this directly
no test coverage detected