| 480 | } |
| 481 | |
| 482 | void CheckRoundtrip(const RecordBatch& batch, |
| 483 | IpcWriteOptions options = IpcWriteOptions::Defaults(), |
| 484 | IpcReadOptions read_options = IpcReadOptions::Defaults(), |
| 485 | int64_t buffer_size = 1 << 20) { |
| 486 | std::stringstream ss; |
| 487 | ss << "test-write-row-batch-" << g_file_number++; |
| 488 | ASSERT_OK_AND_ASSIGN( |
| 489 | mmap_, io::MemoryMapFixture::InitMemoryMap(buffer_size, TempFile(ss.str()))); |
| 490 | |
| 491 | std::shared_ptr<Schema> schema_result; |
| 492 | DoSchemaRoundTrip(*batch.schema(), &schema_result); |
| 493 | ASSERT_TRUE(batch.schema()->Equals(*schema_result)); |
| 494 | |
| 495 | DictionaryMemo dictionary_memo; |
| 496 | ASSERT_OK(::arrow::ipc::internal::CollectDictionaries(batch, &dictionary_memo)); |
| 497 | |
| 498 | ASSERT_OK_AND_ASSIGN( |
| 499 | auto result, DoStandardRoundTrip(batch, options, &dictionary_memo, read_options)); |
| 500 | CheckReadResult(*result, batch); |
| 501 | |
| 502 | ASSERT_OK_AND_ASSIGN(result, DoLargeRoundTrip(batch, /*zero_data=*/true)); |
| 503 | CheckReadResult(*result, batch); |
| 504 | } |
| 505 | |
| 506 | void CheckRoundtrip(const std::shared_ptr<Array>& array, |
| 507 | IpcWriteOptions options = IpcWriteOptions::Defaults(), |
no test coverage detected