| 445 | } |
| 446 | |
| 447 | void 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 | |
| 473 | void DoSimpleRoundtrip(const std::shared_ptr<Table>& table, bool use_threads, |
| 474 | int64_t row_group_size, const std::vector<int>& column_subset, |
no test coverage detected