MCPcopy Create free account
hub / github.com/apache/arrow / RoundtripBatch

Function RoundtripBatch

cpp/src/arrow/ipc/test_common.cc:1262–1275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1260}
1261
1262Status RoundtripBatch(const std::shared_ptr<RecordBatch>& batch,
1263 std::shared_ptr<RecordBatch>* out) {
1264 ARROW_ASSIGN_OR_RAISE(auto out_stream, io::BufferOutputStream::Create());
1265 RETURN_NOT_OK(ipc::WriteRecordBatchStream({batch}, ipc::IpcWriteOptions::Defaults(),
1266 out_stream.get()));
1267
1268 ARROW_ASSIGN_OR_RAISE(auto complete_ipc_stream, out_stream->Finish());
1269
1270 io::BufferReader reader(complete_ipc_stream);
1271 std::shared_ptr<RecordBatchReader> batch_reader;
1272 ARROW_ASSIGN_OR_RAISE(batch_reader, ipc::RecordBatchStreamReader::Open(&reader));
1273 RETURN_NOT_OK(batch_reader->ReadNext(out));
1274 return Status::OK();
1275}
1276
1277} // namespace test
1278} // namespace ipc

Callers 5

TEST_FFunction · 0.85
TEST_FFunction · 0.85
TESTFunction · 0.85
TEST_FFunction · 0.85
ASSERT_OK_AND_ASSIGNFunction · 0.85

Calls 6

WriteRecordBatchStreamFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.70
DefaultsFunction · 0.50
OKFunction · 0.50
getMethod · 0.45
ReadNextMethod · 0.45

Tested by

no test coverage detected