Repository navigation
Conversation
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.
Which issue does this PR close?
Closes #15812. Related to #26490.
Rationale for this change
Parquet float min/max can exclude NaNs. Treating these as complete bounds can discard matching rows, remove necessary filters, return incorrect
MIN/MAX, or replace[1.0, NaN]with[1.0, 1.0].This draft is a count-aware alternative to #24804, which withholds all float bounds. It keeps bounds when the existing metadata proves they are safe. I am proposing it separately to discuss that distinction and the fallback cost before changing the pruning API. Related approaches are the closed #15821 and the narrower constant-column fix in #27283.
What changes are included in this PR?
No public API changes (so far).
What is the testing strategy for this PR?
Regressions, SQL and DataFrame tests
Are there any user-facing changes?
Queries return correct values, but affected min/max optimizations are lost for unknown/positive NaN counts,
TYPE_ORDERfloats (even with zero NaNs), and float schema casts.This can potentially be a large cost. Suppose a row group containing
[10, 20, NaN]with metadatamin = 10, max = 20, unknown NaN count and a filter likeWHERE x >= 100 AND x < 200.With this approach, we make no use of the min/max statistics (not skipping the row group) even though the we can prove that the NaN count is irrelevant for this kind of
WHEREclause.This can be fixed. But before spending time on this optimization I first wanted to get some general feedback on the approach, since it appears there are multiple people working on it
AI Disclosure: Codex