amorynan commented on code in PR #38291:
URL: https://github.com/apache/doris/pull/38291#discussion_r1689435003


##########
be/src/vec/functions/function_cast.h:
##########
@@ -719,14 +719,20 @@ struct ConvertImplGenericFromJsonb {
                 }
                 // add string to string column
                 if (context->jsonb_string_as_string() && is_dst_string && 
value->isString()) {
-                    auto blob = static_cast<const JsonbBlobVal*>(value);
+                    const auto* blob = static_cast<const JsonbBlobVal*>(value);
                     
assert_cast<ColumnString&>(*col_to).insert_data(blob->getBlob(),
                                                                     
blob->getBlobLen());
                     (*vec_null_map_to)[i] = 0;
                     continue;
                 }
-                std::string json_str = 
JsonbToJson::jsonb_to_json_string(val.data, val.size);
-                ReadBuffer read_buffer((char*)(json_str.data()), 
json_str.size());
+                std::string input_str;
+                if (context->jsonb_string_as_string() && value->isString()) {
+                    const auto* blob = static_cast<const JsonbBlobVal*>(value);

Review Comment:
   is here variant str just json binary value ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to