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

Function TEST_P

cpp/src/parquet/chunker_internal_test.cc:1078–1120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1076};
1077
1078TEST_P(TestCDCSingleRowGroup, DeleteOnce) {
1079 const auto& param = GetParam();
1080
1081 ASSERT_OK_AND_ASSIGN(auto base, ConcatAndCombine({part1_, part2_, part3_}));
1082 ASSERT_OK_AND_ASSIGN(auto modified, ConcatAndCombine({part1_, part3_}));
1083 ASSERT_FALSE(base->Equals(*modified));
1084
1085 for (bool enable_dictionary : {false, true}) {
1086 ASSERT_OK_AND_ASSIGN(
1087 auto base_parquet,
1088 WriteTableToBuffer(base, kMinChunkSize, kMaxChunkSize, kRowGroupLength,
1089 enable_dictionary, param.data_page_version));
1090 ASSERT_OK_AND_ASSIGN(
1091 auto modified_parquet,
1092 WriteTableToBuffer(modified, kMinChunkSize, kMaxChunkSize, kRowGroupLength,
1093 enable_dictionary, param.data_page_version));
1094
1095 auto base_info = GetColumnParquetInfo(base_parquet, /*column_index=*/0);
1096 auto modified_info = GetColumnParquetInfo(modified_parquet, /*column_index=*/0);
1097
1098 // assert that there is only one row group
1099 ASSERT_EQ(base_info.size(), 1);
1100 ASSERT_EQ(modified_info.size(), 1);
1101
1102 // check that the chunk sizes are within the expected range
1103 AssertContentDefinedChunkSizes(base->column(0), base_info.front(), param.is_nullable,
1104 kMinChunkSize, kMaxChunkSize,
1105 /*expect_dictionary_page=*/enable_dictionary);
1106 AssertContentDefinedChunkSizes(modified->column(0), modified_info.front(),
1107 param.is_nullable, kMinChunkSize, kMaxChunkSize,
1108 /*expect_dictionary_page=*/enable_dictionary);
1109
1110 // check that there is a single "diff" between the two page length sequences
1111 // and that the diff removes edit_length number of values, there should be no
1112 // other differences because we deal with a single row group (in case of multiple
1113 // row groups the first page of each subsequent row group would be different due
1114 // to shifting caused by the fixed sized row group length)
1115 AssertPageLengthDifferences(base_info.front(), modified_info.front(),
1116 /*exact_number_of_equal_diffs=*/0,
1117 /*exact_number_of_larger_diffs=*/0,
1118 /*exact_number_of_smaller_diffs=*/1, part2_->column(0));
1119 }
1120}
1121
1122TEST_P(TestCDCSingleRowGroup, DeleteTwice) {
1123 const auto& param = GetParam();

Callers

nothing calls this directly

Calls 12

GetColumnParquetInfoFunction · 0.85
schemaFunction · 0.50
fieldFunction · 0.50
EqualsMethod · 0.45
sizeMethod · 0.45
columnMethod · 0.45
num_rowsMethod · 0.45
emptyMethod · 0.45
SliceMethod · 0.45
offsetMethod · 0.45

Tested by

no test coverage detected