pitrou commented on code in PR #51014:
URL: https://github.com/apache/arrow/pull/51014#discussion_r3951230347
##########
cpp/src/arrow/json/reader_test.cc:
##########
@@ -550,10 +551,14 @@ class StreamingReaderTestBase {
auto options = GenerateOptions::Defaults();
options.null_probability = 0;
for (int i = 0; i < num_rows; ++i) {
- StringBuffer string_buffer;
- Writer writer(string_buffer);
+ Writer writer;
ABORT_NOT_OK(Generate(data_fields, engine, &writer, options));
- std::string json = string_buffer.GetString();
+
+ auto json_result = writer.GetString();
+ ABORT_NOT_OK(json_result.status());
+ auto json_view = std::move(json_result).ValueOrDie();
+ std::string json(json_view);
Review Comment:
Oh, you're right. I meant
`writer.GetString().As<std::string>().ValueOrDie()` but your solution is more
concise.
--
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]