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

Function TEST_P

cpp/src/parquet/properties_test.cc:286–351  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284class WriterPropertiesTest : public testing::TestWithParam<WriterPropertiesTestCase> {};
285
286TEST_P(WriterPropertiesTest, RoundTripThroughBuilder) {
287 const std::shared_ptr<WriterProperties>& properties = GetParam().properties;
288 const std::vector<std::shared_ptr<ColumnPath>> columns{
289 ColumnPath::FromDotString("a"),
290 ColumnPath::FromDotString("b"),
291 };
292
293 const auto round_tripped = WriterProperties::Builder(*properties).build();
294
295 ASSERT_EQ(round_tripped->content_defined_chunking_enabled(),
296 properties->content_defined_chunking_enabled());
297 ASSERT_EQ(round_tripped->created_by(), properties->created_by());
298 ASSERT_EQ(round_tripped->data_pagesize(), properties->data_pagesize());
299 ASSERT_EQ(round_tripped->data_page_version(), properties->data_page_version());
300 ASSERT_EQ(round_tripped->dictionary_index_encoding(),
301 properties->dictionary_index_encoding());
302 ASSERT_EQ(round_tripped->dictionary_pagesize_limit(),
303 properties->dictionary_pagesize_limit());
304 ASSERT_EQ(round_tripped->file_encryption_properties(),
305 properties->file_encryption_properties());
306 ASSERT_EQ(round_tripped->max_rows_per_page(), properties->max_rows_per_page());
307 ASSERT_EQ(round_tripped->max_row_group_length(), properties->max_row_group_length());
308 ASSERT_EQ(round_tripped->memory_pool(), properties->memory_pool());
309 ASSERT_EQ(round_tripped->page_checksum_enabled(), properties->page_checksum_enabled());
310 ASSERT_EQ(round_tripped->size_statistics_level(), properties->size_statistics_level());
311 ASSERT_EQ(round_tripped->sorting_columns(), properties->sorting_columns());
312 ASSERT_EQ(round_tripped->store_decimal_as_integer(),
313 properties->store_decimal_as_integer());
314 ASSERT_EQ(round_tripped->write_batch_size(), properties->write_batch_size());
315 ASSERT_EQ(round_tripped->version(), properties->version());
316
317 const auto cdc_options = properties->content_defined_chunking_options();
318 const auto round_tripped_cdc_options =
319 round_tripped->content_defined_chunking_options();
320 ASSERT_EQ(round_tripped_cdc_options.min_chunk_size, cdc_options.min_chunk_size);
321 ASSERT_EQ(round_tripped_cdc_options.max_chunk_size, cdc_options.max_chunk_size);
322 ASSERT_EQ(round_tripped_cdc_options.norm_level, cdc_options.norm_level);
323
324 for (const auto& column : columns) {
325 const auto& column_properties = properties->column_properties(column);
326 const auto& round_tripped_col = round_tripped->column_properties(column);
327
328 ASSERT_EQ(round_tripped_col.compression(), column_properties.compression());
329 ASSERT_EQ(round_tripped_col.compression_level(),
330 column_properties.compression_level());
331 ASSERT_EQ(round_tripped_col.dictionary_enabled(),
332 column_properties.dictionary_enabled());
333 ASSERT_EQ(round_tripped_col.encoding(), column_properties.encoding());
334 ASSERT_EQ(round_tripped_col.max_statistics_size(),
335 column_properties.max_statistics_size());
336 ASSERT_EQ(round_tripped_col.page_index_enabled(),
337 column_properties.page_index_enabled());
338 ASSERT_EQ(round_tripped_col.statistics_enabled(),
339 column_properties.statistics_enabled());
340 const auto round_tripped_bloom_filter_options =
341 round_tripped_col.bloom_filter_options();
342 const auto bloom_filter_options = column_properties.bloom_filter_options();
343 ASSERT_EQ(round_tripped_bloom_filter_options.has_value(),

Callers

nothing calls this directly

Calls 8

BuilderFunction · 0.70
buildMethod · 0.45
memory_poolMethod · 0.45
sorting_columnsMethod · 0.45
versionMethod · 0.45
compressionMethod · 0.45
compression_levelMethod · 0.45
encodingMethod · 0.45

Tested by

no test coverage detected