taepper commented on code in PR #50732:
URL: https://github.com/apache/arrow/pull/50732#discussion_r3681155671


##########
cpp/src/arrow/json/json_writer_internal.cc:
##########
@@ -102,7 +102,13 @@ void JsonWriter::Null() {
   needs_comma_ = true;
 }
 
-std::string_view JsonWriter::GetString() const { return 
builder_.view().value(); }
+std::string_view JsonWriter::GetString() const {
+  std::string_view view;
+  if (builder_.view().get(view) != simdjson::SUCCESS) {
+    return {};
+  }

Review Comment:
   The error in `builder_.view()` can only trigger in `OutOfMemory` cases. 
Should I thread the error through (will also change the api of 
`fixed_shape_tensor.cc` and `opaque.cc`), or can I use `ARROW_CHECK_OK` in the 
users for a non-recoverable error?



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