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