RE: [DISCUSS][C++][Parquet] Expose the API to customize the compression parameter

2023-04-23 Thread Yang, Yang10
Hi, thanks for all your great suggestions. Seems like we are having an alignment on adding a codec::options class instead of passing extra parameters in existing function calls. A virtual base class with derived classes sounds like a good idea to add specific codec options for different

Re: [DISCUSS][C++][Parquet] Expose the API to customize the compression parameter

2023-04-23 Thread Antoine Pitrou
The most idiomatic option seems to be a virtual base class with derived classes as required: ``` class CodecOptions { public: virtual ~CodecOptions() = default; int compression_level; }; class ZlibCodecOptions : public CodecOptions { public: ~CodecOptions() = default; int

Re: [DISCUSS][C++][Parquet] Expose the API to customize the compression parameter

2023-04-23 Thread Gang Wu
It is a good idea to extend the Codec factory to offer more options. However, I don't think adding a `window_bits` parameter as `compression_level` is a good approach as it does not apply to some codecs. IMO, the proposed new `Codec::Options` can be as simple as a std::map. To avoid misuse, we

RE: [DISCUSS][C++][Parquet] Expose the API to customize the compression parameter

2023-04-23 Thread wish maple
On 2023/04/23 09:38:02 "Yang, Yang10" wrote: > Hi, > > As discussed in this issue: https://github.com/apache/arrow/issues/35287, currently Arrow only supports one parameter: compression_level to be customized. We would like to make more compression parameters (such as window_bits) customizable