taepper commented on code in PR #50732:
URL: https://github.com/apache/arrow/pull/50732#discussion_r3681334632
##########
cpp/src/arrow/json/json_writer_internal.cc:
##########
@@ -102,7 +102,14 @@ void JsonWriter::Null() {
needs_comma_ = true;
}
-std::string_view JsonWriter::GetString() const { return
builder_.view().value(); }
+Result<std::string_view> JsonWriter::GetString() const {
+ std::string_view view;
+ if (auto error = builder_.view().get(view); error != simdjson::SUCCESS) {
+ return Status::OutOfMemory(
+ "OutOfMemory when allocating buffer to serialize json to string");
Review Comment:
It does not. As the error is just an enum, it will only add the message of:
```{ OUT_OF_CAPACITY, /*message=*/"OUT_OF_CAPACITY: The capacity was
exceeded, we cannot allocate enough memory."}```
--
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]