wgtmac commented on code in PR #55449:
URL: https://github.com/apache/arrow/pull/55449#discussion_r4522373254
##########
cpp/src/parquet/encoding.h:
##########
@@ -433,16 +434,18 @@ PARQUET_EXPORT
std::unique_ptr<Encoder> MakeEncoder(
Type::type type_num, Encoding::type encoding, bool use_dictionary = false,
const ColumnDescriptor* descr = NULLPTR,
- ::arrow::MemoryPool* pool = ::arrow::default_memory_pool());
+ ::arrow::MemoryPool* pool = ::arrow::default_memory_pool(),
+ const AlpConfig& alp_config = {});
Review Comment:
Good idea! I have explored several approaches and now added a
`EncodingOptions` like below:
```cpp
/// Configuration for ALP encoding.
struct PARQUET_EXPORT AlpOptions {
int32_t vector_size{kDefaultVectorSize};
int64_t sampling_window_size{kDefaultSamplingWindowSize};
};
/// Options for the encodings that a column writer or encoder may use.
struct PARQUET_EXPORT EncodingOptions {
std::unordered_map<Encoding::type, std::any> options;
};
```
I would like to move `ColumnProperties::dictionary_enabled_` and
`ColumnProperties::encoding_` all together but it will be a larger breaking
change. In the future, I think we can add more to `EncodingOptions` like
adaptive encoding, specifying fallback, etc.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]