This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new a6fe815f06a branch-2.1: [Bug](function) add index check on function 
like #47991 (#48019)
a6fe815f06a is described below

commit a6fe815f06a542ed3600602aa94b9538e53beb05
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Feb 19 15:22:51 2025 +0800

    branch-2.1: [Bug](function) add index check on function like #47991 (#48019)
    
    Cherry-picked from #47991
    
    Co-authored-by: Pxl <x...@selectdb.com>
---
 be/src/vec/functions/like.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/vec/functions/like.cpp b/be/src/vec/functions/like.cpp
index b44351bd49d..dcb4fc6dd0d 100644
--- a/be/src/vec/functions/like.cpp
+++ b/be/src/vec/functions/like.cpp
@@ -573,7 +573,7 @@ Status FunctionLikeBase::execute_substring(const 
ColumnString::Chars& values,
 
         /// Determine which index it refers to.
         /// begin + value_offsets[i] is the start offset of string at i+1
-        while (begin + value_offsets[i] < pos) {
+        while (i < value_offsets.size() && begin + value_offsets[i] < pos) {
             ++i;
         }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to