fix: respect inexact flags in row group metadata#16412
Merged
alamb merged 3 commits intoapache:mainfrom Aug 18, 2025
Merged
Conversation
|
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days. |
27eeff3 to
27b4595
Compare
1eaac41 to
c43f1de
Compare
Contributor
Author
|
Hi @alamb, this pr tried to extract the exactness flags in row group metadata, could you please take a look :) |
c43f1de to
bf10479
Compare
xudong963
reviewed
Aug 15, 2025
| /// The value `0` appears at indices `[0, 2, 4]`. The corresponding exactness | ||
| /// values are `[true, false, false]`. Since at least one is `true`, the | ||
| /// function returns `Some(true)`. | ||
| fn has_any_exact_match( |
Contributor
Author
There was a problem hiding this comment.
Updated a unit test with 4 possible scenarios. Also use a struct to make clippy happy, PTAL :)
xudong963
approved these changes
Aug 15, 2025
Member
xudong963
left a comment
There was a problem hiding this comment.
Thank you, this is a good finding and nice fix!
Contributor
|
Thank you @xudong963 and @CookiePieWw |
LiaCastaneda
added a commit
to DataDog/datafusion
that referenced
this pull request
Sep 23, 2025
This reverts commit afc90f7.
LiaCastaneda
added a commit
to DataDog/datafusion
that referenced
this pull request
Sep 23, 2025
This reverts commit afc90f7.
LiaCastaneda
added a commit
to DataDog/datafusion
that referenced
this pull request
Sep 23, 2025
This reverts commit afc90f7.
LiaCastaneda
added a commit
to DataDog/datafusion
that referenced
this pull request
Sep 30, 2025
This reverts commit afc90f7.
LiaCastaneda
added a commit
to DataDog/datafusion
that referenced
this pull request
Sep 30, 2025
* Revert "Upgrade arrow/parquet to 56.0.0 (apache#16690)" This reverts commit fa1f8c1. * Revert "refactor: use upstream inline_key_fast (apache#17044)" This reverts commit 71b92bc. * Revert "fix: respect inexact flags in row group metadata (apache#16412)" This reverts commit afc90f7. * Revert "Test grouping by FixedSizeList (apache#17415)" This reverts commit 03f39e5. * Spelling (got reverted) * Also allow Byt from tests * Adjust sqllogictests
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?
Rationale for this change
Currently, datafusion will treat all max and min values in column stats as exact, while some of them may be inexact.
What changes are included in this PR?
For each row group, when max or min value is calculated, retrieve its corresponding exactness flag. The final max or min value's exactness represents the final exactness flag. Wrap the max and min stats with
InexactorExactbased on the final exactness flagAre these changes tested?
Are there any user-facing changes?
Now datafusion will correctly report the exactness of column max and min values.