[Bug](table-function) fix wrong result when seprator of explode_split size more than one (#18824)

fix wrong result when seprator of explode_split size more than one
This commit is contained in:
Pxl
2023-04-21 11:00:47 +08:00
committed by GitHub
parent 60640bdef0
commit c033c6239f
3 changed files with 8 additions and 2 deletions

View File

@ -95,11 +95,10 @@ Status VExplodeSplitTableFunction::process_row(size_t row_idx) {
if (first != second) {
output.emplace_back(strv.substr(std::distance(strv.begin(), first),
std::distance(first, second)));
first = std::next(second);
} else {
output.emplace_back("", 0);
first = std::next(second, delims.size());
}
first = std::next(second, delims.size());
if (second == last) {
break;