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

lide pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-1.2-lts by this push:
     new 87589b05023 [fix](function) fixed truncation of get_json_string 
function due to too long string (#32141)
87589b05023 is described below

commit 87589b05023d4a8cfee95a2c63625b3b45b4b70c
Author: lw112 <131352377+felixw...@users.noreply.github.com>
AuthorDate: Tue Mar 12 20:59:01 2024 +0800

    [fix](function) fixed truncation of get_json_string function due to too 
long string (#32141)
---
 be/src/vec/functions/function_json.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/src/vec/functions/function_json.cpp 
b/be/src/vec/functions/function_json.cpp
index e85e29c5a1e..d4c46d829a2 100644
--- a/be/src/vec/functions/function_json.cpp
+++ b/be/src/vec/functions/function_json.cpp
@@ -350,7 +350,7 @@ struct GetJsonString {
             rapidjson::Value* root = nullptr;
 
             root = get_json_object<JSON_FUN_STRING>(json_string, path_string, 
&document);
-            const int max_string_len = 65535;
+            const int max_string_len = (l_size <= 65535) ? 65535 : (l_size + 
1);
 
             if (root == nullptr || root->IsNull()) {
                 StringOP::push_null_string(i, res_data, res_offsets, null_map);


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

Reply via email to