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

Method CheckRoundtrip

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

Source from the content-addressed store, hash-verified

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

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