-
Notifications
You must be signed in to change notification settings - Fork 462
PARQUET-686: Add optional {signed,unsigned}_{min,max} fields to Statistics #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c06e197
Add optional {signed,unsigned}_{min,max} fields to Statistics
f310c5a
Remove parquet-mr specific reference
8f33c3a
removal of explicit signed_{min,max} in Statistics
35632de
Revert "removal of explicit signed_{min,max} in Statistics"
fc79696
Improved comment
eaf8c54
fix inline comments
b9fddb2
Update comment and add README section
474ece8
Add comment about Binary sorting
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -194,6 +194,13 @@ enum FieldRepetitionType { | |
| /** | ||
| * Statistics per row group and per page | ||
| * All fields are optional. | ||
| * | ||
| * For BinaryStatistics in Parquet, we want to distinguish between the statistics derived from | ||
| * comparisons of signed or unsigned bytes. | ||
| * By default, Parquet will compare Binary type data as a signed bytestring, and this is the | ||
| * default behavior for filter pushdown when signed and unsigned are not specified in the | ||
| * Statistics. However, when signed_min, signed_max, unsigned_min and unsigned_max are all | ||
| * specified, the client has the option of using either signed or unsigned bytestring statistics. | ||
| */ | ||
| struct Statistics { | ||
| /** min and max value of the column, encoded in PLAIN encoding */ | ||
|
|
@@ -203,6 +210,12 @@ struct Statistics { | |
| 3: optional i64 null_count; | ||
| /** count of distinct values occurring */ | ||
| 4: optional i64 distinct_count; | ||
| /* Signed min and max */ | ||
|
||
| 5: optional binary signed_max; | ||
| 6: optional binary signed_min; | ||
| /* Unsigned min and max */ | ||
| 7: optional binary unsigned_max; | ||
| 8: optional binary unsigned_min; | ||
| } | ||
|
|
||
| /** | ||
|
|
||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about we say for a given file, it's binary stats will be written 1 of 3 ways: