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

Method RoundTripTable

cpp/src/arrow/ipc/read_write_test.cc:2629–2641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2627 }
2628
2629 Status RoundTripTable(const RecordBatchVector& in_batches,
2630 RecordBatchVector* out_batches) {
2631 WriterHelper writer_helper;
2632 RETURN_NOT_OK(writer_helper.Init(in_batches[0]->schema(), write_options_));
2633 // WriteTable is different from a series of WriteBatch for RecordBatchFileWriter
2634 RETURN_NOT_OK(writer_helper.WriteTable(in_batches));
2635 RETURN_NOT_OK(writer_helper.Finish(&write_stats_));
2636 RETURN_NOT_OK(writer_helper.ReadBatches(read_options_, out_batches, &read_stats_));
2637 for (const auto& batch : *out_batches) {
2638 RETURN_NOT_OK(batch->ValidateFull());
2639 }
2640 return Status::OK();
2641 }
2642
2643 void CheckBatches(const RecordBatchVector& expected, const RecordBatchVector& actual) {
2644 ASSERT_EQ(expected.size(), actual.size());

Callers

nothing calls this directly

Calls 7

OKFunction · 0.50
InitMethod · 0.45
schemaMethod · 0.45
WriteTableMethod · 0.45
FinishMethod · 0.45
ReadBatchesMethod · 0.45
ValidateFullMethod · 0.45

Tested by

no test coverage detected