Repository navigation
GH-55948: [C++][Dataset][Parquet] Preserve signed-zero bounds in predicate pushdown - #55954
Open
valleysonata wants to merge 2 commits into
Open
valleysonata wants to merge 2 commits into
valleysonata wants to merge 2 commits into
Conversation
Do not turn Parquet bounds spanning both signs of zero into a single-value guarantee.
Check that a reciprocal filter retains a Parquet row group containing +0.0.
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 #55948.
Rationale
Parquet statistics can store a minimum of
-0.0and a maximum of+0.0for a row group containing positive zeros. Treating those bounds as a single value lets filter simplification substitute negative zero and incorrectly skip matching rows.Changes
Distinguish the signs of zero when deciding whether the bounds represent a single value. If the signs differ, retain the range guarantee. Add a regression test for a reciprocal filter on a row group containing positive zero.
Tests
All 61 tests in
arrow-dataset-file-parquet-testpassed, including the new regression in threaded and serial scans. A separate focused check showed the original code simplified the predicate tofalse; the fix preserves the predicate.User-facing changes
Critical Fix: Sign-sensitive Parquet filters no longer drop matching rows in this case. No API changes.
Was AI used for this PR?
PR code and description written by:
Reviewed before submission by:
AI helped prepare the patch, regression test, and description. The contributor reviewed the patch.