diff --git a/be/src/vec/functions/function_string.h b/be/src/vec/functions/function_string.h index 0bd1dac58f..c6294a08c4 100644 --- a/be/src/vec/functions/function_string.h +++ b/be/src/vec/functions/function_string.h @@ -1013,7 +1013,7 @@ public: int32_t num = 0; while (num < part_number) { pre_offset = offset; - size_t n = str.size - offset; + size_t n = str.size - offset - 1; const char* pos = reinterpret_cast( memchr(str.data + offset + 1, delimiter_str[0], n)); if (pos != nullptr) {