Add set_max_statistics_size to WriterProperties#581
Merged
Conversation
16 tasks
adamreeve
reviewed
Oct 20, 2025
Comment on lines
+553
to
+556
| /// Specify max statistics size to store min max value. | ||
| /// Default 4KB. | ||
| /// </summary> | ||
| /// <param name="maxStatisticsSize">The max statistics size to store min max value</param> |
Contributor
There was a problem hiding this comment.
It's a bit unclear to me what this means exactly. This should specify the unit and explain more clearly how it is used, eg. whether it's a total size in the whole file or per statistic.
From https://github.com/apache/arrow/blob/cbd36b817fc77812f8df1a15bf24314de3b27f29/cpp/src/parquet/statistics.h#L148, it looks like this is applied for each individual min and max value, so is useful for string or binary typed columns that could be very long.
Suggested change
| /// Specify max statistics size to store min max value. | |
| /// Default 4KB. | |
| /// </summary> | |
| /// <param name="maxStatisticsSize">The max statistics size to store min max value</param> | |
| /// Specify the maximum size in bytes for minimum and maximum values in page and column chunk statistics. | |
| /// Default 4 KiB. | |
| /// </summary> | |
| /// <param name="maxStatisticsSize">The max statistics size in bytes</param> |
|
|
||
| [DllImport(ParquetDll.Name)] | ||
| private static extern IntPtr WriterProperties_Max_Statistics_Size(IntPtr writerProperties, IntPtr path, [MarshalAs(UnmanagedType.I1)] out ulong maxStatisticsSize); | ||
| private static extern IntPtr WriterProperties_Max_Statistics_Size(IntPtr writerProperties, IntPtr path, [MarshalAs(UnmanagedType.U8)] out ulong maxStatisticsSize); |
Contributor
There was a problem hiding this comment.
The MarshalAs attribute shouldn't be necessary as U8 should be the default for a ulong. It looks like having I1 previously was a copy-paste error.
Contributor
Author
There was a problem hiding this comment.
Got u! I'll remove it
adamreeve
approved these changes
Oct 22, 2025
This was referenced Apr 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.