You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "yyang52 (via GitHub)" <gi...@apache.org> on 2023/07/24 01:28:51 UTC

[GitHub] [arrow] yyang52 commented on a diff in pull request #35886: GH-35287: [C++][Parquet] Add CodecOptions to customize the compression parameter

yyang52 commented on code in PR #35886:
URL: https://github.com/apache/arrow/pull/35886#discussion_r1271627915


##########
cpp/src/parquet/file_writer.cc:
##########
@@ -291,12 +304,24 @@ class RowGroupSerializer : public RowGroupWriter::Contents {
       auto oi_builder = page_index_builder_ && properties_->page_index_enabled(path)
                             ? page_index_builder_->GetOffsetIndexBuilder(column_ordinal)
                             : nullptr;
-      std::unique_ptr<PageWriter> pager = PageWriter::Open(
-          sink_, properties_->compression(path), properties_->compression_level(path),
-          col_meta, static_cast<int16_t>(row_group_ordinal_),
-          static_cast<int16_t>(column_ordinal), properties_->memory_pool(),
-          buffered_row_group_, meta_encryptor, data_encryptor,
-          properties_->page_checksum_enabled(), ci_builder, oi_builder);
+      auto codec_options = properties_->codec_options(path)
+                               ? (properties_->codec_options(path)).get()
+                               : nullptr;
+
+      std::unique_ptr<PageWriter> pager;
+      if (!codec_options) {
+        pager = PageWriter::Open(sink_, properties_->compression(path), col_meta,
+                                 row_group_ordinal_, static_cast<int16_t>(column_ordinal),
+                                 properties_->memory_pool(), false, meta_encryptor,

Review Comment:
   Sorry for this missing and thanks for the fix!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org