Repository navigation
Conversation
This branch has not been deployed
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.
Closes #4312
Rationale for this change
data_file_statistics_from_parquet_metadatabuilt a column's bounds from the row groups that report a min/max and silently skipped a row group whose statistics have no min/max. PyArrow writes such statistics when a value is larger than 4 KB. The stored bounds then exclude that row group's values, and the metrics evaluator prunes the file from scans that should match it.With this change, a row group that holds non-null values but reports no min/max drops the column's bounds for the file. The column keeps its null and value counts, because the row group still reports them. A row group whose values are all null still has no effect on the bounds.
Are these changes tested?
Yes.
test_bounds_absent_when_a_row_group_with_values_has_no_min_maxwrites two row groups per column. One column has a 5,000-character value in its second row group, and the other column has an all-null first row group. The test fails without the change: the first column keeps the boundb'a'.tests/io/test_pyarrow_stats.pyand the unit tests oftests/io/test_pyarrow.pypass, andprekpasses on the changed files.Are there any user-facing changes?
Data files written from now on have no bounds for such a column, so scans no longer skip their matching rows. Files already written keep their bounds.