kou commented on code in PR #46696: URL: https://github.com/apache/arrow/pull/46696#discussion_r2125191086
########## cpp/src/arrow/json/from_string.cc: ########## @@ -1052,28 +1047,27 @@ Status ScalarFromJSONString(const std::shared_ptr<DataType>& type, RETURN_NOT_OK(converter->AppendValue(json_doc)); RETURN_NOT_OK(converter->Finish(&array)); DCHECK_EQ(array->length(), 1); - return array->GetScalar(0).Value(out); + ARROW_ASSIGN_OR_RAISE(auto out, array->GetScalar(0)); + return out; Review Comment: Can we simplify this? ```suggestion return array->GetScalar(0); ``` -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org