Skip to content

Commit

Permalink
GH-40174: [C++][CI][Parquet] Fixing parquet column_writer_test buildi…
Browse files Browse the repository at this point in the history
…ng (#40175)

### Rationale for this change

Remove `ThrowsMessage` for CI build.

### What changes are included in this PR?

Remove `ThrowsMessage` for CI build.

### Are these changes tested?

no need

### Are there any user-facing changes?

no

* Closes: #40174

Authored-by: mwish <maplewish117@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
  • Loading branch information
mapleFU authored and raulcd committed Feb 22, 2024
1 parent 8c69590 commit 1c41fca
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions cpp/src/parquet/column_writer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ using TestByteArrayValuesWriter = TestPrimitiveWriter<ByteArrayType>;
using TestFixedLengthByteArrayValuesWriter = TestPrimitiveWriter<FLBAType>;

using ::testing::HasSubstr;
using ::testing::ThrowsMessage;

TYPED_TEST(TestPrimitiveWriter, RequiredPlain) {
this->TestRequiredWithEncoding(Encoding::PLAIN);
Expand Down Expand Up @@ -918,20 +917,27 @@ TEST(TestPageWriter, ThrowsOnPagesTooLarge) {
DataPageV1 over_compressed_limit(buffer, /*num_values=*/100, Encoding::BIT_PACKED,
Encoding::BIT_PACKED, Encoding::BIT_PACKED,
/*uncompressed_size=*/100);
EXPECT_THAT([&]() { pager->WriteDataPage(over_compressed_limit); },
ThrowsMessage<ParquetException>(HasSubstr("overflows INT32_MAX")));
EXPECT_THROW_THAT([&]() { pager->WriteDataPage(over_compressed_limit); },
ParquetException,
::testing::Property(&ParquetException::what,
::testing::HasSubstr("overflows INT32_MAX")));
DictionaryPage dictionary_over_compressed_limit(buffer, /*num_values=*/100,
Encoding::PLAIN);
EXPECT_THAT([&]() { pager->WriteDictionaryPage(dictionary_over_compressed_limit); },
ThrowsMessage<ParquetException>(HasSubstr("overflows INT32_MAX")));
EXPECT_THROW_THAT(
[&]() { pager->WriteDictionaryPage(dictionary_over_compressed_limit); },
ParquetException,
::testing::Property(&ParquetException::what,
::testing::HasSubstr("overflows INT32_MAX")));

buffer = std::make_shared<Buffer>(&data, 1);
DataPageV1 over_uncompressed_limit(
buffer, /*num_values=*/100, Encoding::BIT_PACKED, Encoding::BIT_PACKED,
Encoding::BIT_PACKED,
/*uncompressed_size=*/std::numeric_limits<int32_t>::max() + int64_t{1});
EXPECT_THAT([&]() { pager->WriteDataPage(over_compressed_limit); },
ThrowsMessage<ParquetException>(HasSubstr("overflows INT32_MAX")));
EXPECT_THROW_THAT([&]() { pager->WriteDataPage(over_compressed_limit); },
ParquetException,
::testing::Property(&ParquetException::what,
::testing::HasSubstr("overflows INT32_MAX")));
}

TEST(TestColumnWriter, RepeatedListsUpdateSpacedBug) {
Expand Down

0 comments on commit 1c41fca

Please sign in to comment.