You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "eldenmoon (via GitHub)" <gi...@apache.org> on 2023/07/20 01:45:37 UTC

[GitHub] [doris] eldenmoon commented on a diff in pull request #21988: [Fix](json reader) fix rapidjson `array->PushBack` may take ownership…

eldenmoon commented on code in PR #21988:
URL: https://github.com/apache/doris/pull/21988#discussion_r1268843049


##########
be/src/exprs/json_functions.cpp:
##########
@@ -172,11 +172,13 @@ rapidjson::Value* JsonFunctions::get_json_array_from_parsed_json(
     rapidjson::Value* root = match_value(parsed_paths, document, mem_allocator, true);
     if (root == nullptr || root == document) { // not found
         return nullptr;
-    } else if (!root->IsArray()) {
+    } else if (!root->IsArray() && wrap_explicitly) {

Review Comment:
   just check  if it is a null pointer



-- 
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-unsubscribe@doris.apache.org

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


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