| 8 | |
| 9 | struct SplitPart { |
| 10 | static void operation(string_t& strToSplit, string_t& separator, int64_t idx, string_t& result, |
| 11 | ValueVector& resultVector) { |
| 12 | auto splitStrVec = StringUtils::split(strToSplit.getAsString(), separator.getAsString()); |
| 13 | bool idxOutOfRange = idx <= 0 || (uint64_t)idx > splitStrVec.size(); |
| 14 | std::string resultStr = idxOutOfRange ? "" : splitStrVec[idx - 1]; |
| 15 | StringVector::addString(&resultVector, result, resultStr); |
| 16 | } |
| 17 | }; |
| 18 | |
| 19 | static std::unique_ptr<FunctionBindData> bindFunc(const ScalarBindFuncInput& input) { |
nothing calls this directly
no test coverage detected