Skip to content

Commit

Permalink
GH-38852: [C++] Replace "#ifdef ARROW_WITH_GZIP" in dataset test to A…
Browse files Browse the repository at this point in the history
…RROW_WITH_ZLIB (#38853)

### Rationale for this change

We don't define `ARROW_WITH_GZIP` macro when we can use gzip. We use `ARROW_WITH_ZLIB` instead. So `ARROW_WITH_ZLIB` is always not defined.

### What changes are included in this PR?

change `ARROW_WITH_GZIP` to `ARROW_WITH_ZLIB`

### Are these changes tested?

previously not tested, but now there're

### Are there any user-facing changes?

no

* Closes: #38852

Authored-by: mwish <maplewish117@gmail.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
mapleFU committed Nov 23, 2023
1 parent 3726773 commit 8e28f6b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions cpp/src/parquet/column_writer_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,9 @@ class TestPrimitiveWriter : public PrimitiveTypedTest<TestType> {
ColumnProperties column_properties(encoding, compression, enable_dictionary,
enable_statistics);
column_properties.set_codec_options(codec_options);
std::shared_ptr<TypedColumnWriter<TestType>> writer = this->BuildWriter(
num_rows, column_properties, ParquetVersion::PARQUET_1_0, enable_checksum);
std::shared_ptr<TypedColumnWriter<TestType>> writer =
this->BuildWriter(num_rows, column_properties, ParquetVersion::PARQUET_1_0,
ParquetDataPageVersion::V1, enable_checksum);
writer->WriteBatch(this->values_.size(), nullptr, nullptr, this->values_ptr_);
// The behaviour should be independent from the number of Close() calls
writer->Close();
Expand Down Expand Up @@ -557,7 +558,7 @@ TYPED_TEST(TestPrimitiveWriter, RequiredPlainWithStatsAndBrotliCompression) {

#endif

#ifdef ARROW_WITH_GZIP
#ifdef ARROW_WITH_ZLIB
TYPED_TEST(TestPrimitiveWriter, RequiredPlainWithGzipCompression) {
this->TestRequiredWithSettings(Encoding::PLAIN, Compression::GZIP, false, false,
LARGE_SIZE);
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/parquet/file_deserialize_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ static std::vector<Compression::type> GetSupportedCodecTypes() {
codec_types.push_back(Compression::BROTLI);
#endif

#ifdef ARROW_WITH_GZIP
#ifdef ARROW_WITH_ZLIB
codec_types.push_back(Compression::GZIP);
#endif

Expand Down
2 changes: 1 addition & 1 deletion cpp/src/parquet/file_serialize_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ TYPED_TEST(TestSerialize, SmallFileBrotli) {
}
#endif

#ifdef ARROW_WITH_GZIP
#ifdef ARROW_WITH_ZLIB
TYPED_TEST(TestSerialize, SmallFileGzip) {
ASSERT_NO_FATAL_FAILURE(this->FileSerializeTest(Compression::GZIP));
}
Expand Down

0 comments on commit 8e28f6b

Please sign in to comment.