You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "mapleFU (via GitHub)" <gi...@apache.org> on 2024/03/24 16:07:21 UTC

[I] [C++][Parquet] Minor: Enhance style for creating page writer [arrow]

mapleFU opened a new issue, #40767:
URL: https://github.com/apache/arrow/issues/40767

   ### Describe the enhancement requested
   
   ```c++
       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());
       } 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);
       }
   ```
   
   This kind of code is so ugly and bug prone (see https://github.com/apache/arrow/pull/36829 ). I prefer to using one `PageWriter::Open` here
   
   ### Component(s)
   
   C++, Parquet


-- 
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: issues-unsubscribe@arrow.apache.org.apache.org

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


Re: [I] [C++][Parquet] Minor: Enhance style for creating page writer [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed issue #40767: [C++][Parquet] Minor: Enhance style for creating page writer
URL: https://github.com/apache/arrow/issues/40767


-- 
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: issues-unsubscribe@arrow.apache.org

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


Re: [I] [C++][Parquet] Minor: Enhance style for creating page writer [arrow]

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on issue #40767:
URL: https://github.com/apache/arrow/issues/40767#issuecomment-2020321394

   Issue resolved by pull request 40768
   https://github.com/apache/arrow/pull/40768


-- 
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


Re: [I] [C++][Parquet] Minor: Enhance style for creating page writer [arrow]

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #40767:
URL: https://github.com/apache/arrow/issues/40767#issuecomment-2016857958

   This origin is part of https://github.com/apache/arrow/pull/37400 . But @wgtmac thinks extracting it is better. I also agree that


-- 
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