Skip to content

Commit 60615a5

Browse files
authored
GH-50212: [C++][Parquet] Add PrintTo to fix failure in parquet-internals-test on test-conda-cpp-valgrind (#50213)
### Rationale for this change Fix #50212 `Test #89: parquet-internals-test .......................***Failed 14.96 sec` ### What changes are included in this PR? Add custom `PrintTo` for parameter `BloomFilterBuilderFoldingTestCase` introduced with pr #50008, so gtest prints fields instead of raw bytes (error `Use of uninitialised value`). Similar to the past solution in commit 1b7e396 but with additional field names/debug output. ### Are these changes tested? Yes, by CI. ### Are there any user-facing changes? No. * GitHub Issue: #50212 Authored-by: Tadeja Kadunc <tadeja.kadunc@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>
1 parent 82b6fa5 commit 60615a5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cpp/src/parquet/bloom_filter_reader_writer_test.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,12 @@ struct BloomFilterBuilderFoldingTestCase {
159159
int64_t expected_bitset_ndv;
160160
};
161161

162+
void PrintTo(const BloomFilterBuilderFoldingTestCase& test_case, std::ostream* os) {
163+
*os << "{ndv=" << test_case.ndv << ", fold=" << test_case.fold
164+
<< ", inserted_count=" << test_case.inserted_count
165+
<< ", expected_bitset_ndv=" << test_case.expected_bitset_ndv << "}";
166+
}
167+
162168
class BloomFilterBuilderFoldingTest
163169
: public ::testing::TestWithParam<BloomFilterBuilderFoldingTestCase> {};
164170

0 commit comments

Comments
 (0)