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


##########
cpp/src/arrow/integration/json_internal.cc:
##########
@@ -111,11 +112,10 @@ std::string GetTimeUnitName(TimeUnit::type unit) {
   return "UNKNOWN";
 }
 
-Result<std::string_view> GetStringView(const rj::Value& str) {
-  if (!str.IsString()) {
-    return Status::Invalid("field was not a string");
-  }
-  return std::string_view{str.GetString(), str.GetStringLength()};
+Result<std::string_view> GetStringView(const JsonValue& value) {
+  ARROW_ASSIGN_OR_RAISE(auto string, internal::ResolveSimdjsonResult(
+                                         value.get_string(), "field was not a 
string"));

Review Comment:
   It seems that `simdjson::dom::element::get_string()` returns 
`std::string_view` not `std::string`.



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