Reranko05 commented on code in PR #50672:
URL: https://github.com/apache/arrow/pull/50672#discussion_r3667716748


##########
cpp/src/arrow/json/object_parser.cc:
##########
@@ -69,7 +71,12 @@ class ObjectParser::Impl {
                              "': ", 
simdjson::error_message(str_result.error()));
     }
 
-    return std::string(str_result.value());
+    std::string_view str;
+    if (auto error = std::move(str_result).get(str)) {
+      return Status::Invalid("Error getting string for key '", key,
+                             "': ", simdjson::error_message(error));
+    }
+    return std::string(str);

Review Comment:
   Thanks for the suggestions! I opened #50693 to track this cleanup after 
#50672 is merged.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to