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


##########
cpp/src/arrow/json/object_parser.cc:
##########
@@ -82,11 +89,10 @@ class ObjectParser::Impl {
     for (auto field : object) {
       auto key_result = field.unescaped_key();
 
-      auto key = key_result.value();
-
-      if (key_result.error()) {
-        return Status::Invalid("Error getting value for key '", 
std::string(key),
-                               "': ", 
simdjson::error_message(key_result.error()));
+      std::string_view key;
+      if (auto error = std::move(key_result).get(key)) {

Review Comment:
   Can we simplify this?
   
   ```suggestion
         if (auto error = field.unescaped_key().get(key)) {
   ```



-- 
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