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

Function CheckConfiguredRoundtrip

cpp/src/parquet/arrow/arrow_reader_writer_test.cc:447–471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

445}
446
447void CheckConfiguredRoundtrip(
448 const std::shared_ptr<Table>& input_table,
449 const std::shared_ptr<Table>& expected_table = nullptr,
450 const std::shared_ptr<::parquet::WriterProperties>& writer_properties =
451 ::parquet::default_writer_properties(),
452 const std::shared_ptr<ArrowWriterProperties>& arrow_writer_properties =
453 default_arrow_writer_properties(),
454 const ArrowReaderProperties& arrow_reader_properties =
455 default_arrow_reader_properties()) {
456 std::shared_ptr<Table> actual_table;
457 ASSERT_NO_FATAL_FAILURE(DoRoundtrip(input_table, input_table->num_rows(), &actual_table,
458 writer_properties, arrow_writer_properties,
459 arrow_reader_properties));
460 if (expected_table) {
461 ASSERT_NO_FATAL_FAILURE(::arrow::AssertSchemaEqual(*actual_table->schema(),
462 *expected_table->schema(),
463 /*check_metadata=*/false));
464 ASSERT_NO_FATAL_FAILURE(::arrow::AssertTablesEqual(*expected_table, *actual_table));
465 } else {
466 ASSERT_NO_FATAL_FAILURE(::arrow::AssertSchemaEqual(*actual_table->schema(),
467 *input_table->schema(),
468 /*check_metadata=*/false));
469 ASSERT_NO_FATAL_FAILURE(::arrow::AssertTablesEqual(*input_table, *actual_table));
470 }
471}
472
473void DoSimpleRoundtrip(const std::shared_ptr<Table>& table, bool use_threads,
474 int64_t row_group_size, const std::vector<int>& column_subset,

Callers 2

TESTFunction · 0.85
CheckListViewRoundTripFunction · 0.85

Calls 6

DoRoundtripFunction · 0.85
AssertTablesEqualFunction · 0.85
num_rowsMethod · 0.45
schemaMethod · 0.45

Tested by

no test coverage detected