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

Method CheckRoundtrip

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

Source from the content-addressed store, hash-verified

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(),

Callers 1

TEST_FFunction · 0.45

Calls 11

CollectDictionariesFunction · 0.85
CheckRoundtripFunction · 0.85
strMethod · 0.80
DefaultsFunction · 0.50
ASSERT_OK_AND_ASSIGNFunction · 0.50
fieldFunction · 0.50
MakeFunction · 0.50
schemaMethod · 0.45
EqualsMethod · 0.45
typeMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected