pitrou commented on code in PR #55449:
URL: https://github.com/apache/arrow/pull/55449#discussion_r4511270597


##########
cpp/src/parquet/properties.h:
##########
@@ -375,6 +375,19 @@ struct PARQUET_EXPORT CdcOptions {
   int norm_level = 0;
 };
 
+/// EXPERIMENTAL: Configuration for ALP encoding.
+struct PARQUET_EXPORT AlpConfig {
+  /// Values per encoded vector. Must be a power of two in [8, 32768].
+  int32_t vector_size = 1024;
+
+  /// Target number of non-null input values examined before caching the 
preset.
+  /// Must be positive.
+  int64_t sampling_window_size = 122880;

Review Comment:
   This seems like a magic value, how did we come up to this?



##########
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:
   Please let's make this generic and not encoding-specific.
   
   Either using an abstract base class for encoding-specific options, or 
(lazier solution) `std::any`.



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

Reply via email to