This is an automated email from the ASF dual-hosted git repository.

gangwu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 78bbe7676c GH-36828: [C++][Parquet] Make buffered RowGroupSerializer 
using BufferedPageWriter (#36829)
78bbe7676c is described below

commit 78bbe7676c1437a123f0ce3f4ba4089917f2be0a
Author: mwish <[email protected]>
AuthorDate: Mon Jul 24 17:05:51 2023 +0800

    GH-36828: [C++][Parquet] Make buffered RowGroupSerializer using 
BufferedPageWriter (#36829)
    
    
    
    ### Rationale for this change
    
    See https://github.com/apache/arrow/issues/36828
    
    ### What changes are included in this PR?
    
    Add `buffered` argument when building `PageWriter`
    
    ### Are these changes tested?
    
    no
    
    ### Are there any user-facing changes?
    
    no
    
    * Closes: #36828
    
    Authored-by: mwish <[email protected]>
    Signed-off-by: Gang Wu <[email protected]>
---
 cpp/src/parquet/file_writer.cc | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/cpp/src/parquet/file_writer.cc b/cpp/src/parquet/file_writer.cc
index ef86e74236..2a6a88df2d 100644
--- a/cpp/src/parquet/file_writer.cc
+++ b/cpp/src/parquet/file_writer.cc
@@ -310,17 +310,17 @@ class RowGroupSerializer : public 
RowGroupWriter::Contents {
 
       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,
-                                 data_encryptor, 
properties_->page_checksum_enabled(),
-                                 ci_builder, oi_builder, CodecOptions());
+        pager = PageWriter::Open(
+            sink_, properties_->compression(path), col_meta, 
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, 
CodecOptions());
       } else {
-        pager = PageWriter::Open(sink_, properties_->compression(path), 
col_meta,
-                                 row_group_ordinal_, 
static_cast<int16_t>(column_ordinal),
-                                 properties_->memory_pool(), false, 
meta_encryptor,
-                                 data_encryptor, 
properties_->page_checksum_enabled(),
-                                 ci_builder, oi_builder, *codec_options);
+        pager = PageWriter::Open(
+            sink_, properties_->compression(path), col_meta, 
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, 
*codec_options);
       }
       column_writers_.push_back(
           ColumnWriter::Make(col_meta, std::move(pager), properties_));

Reply via email to