NaN cannot be a min/max value of a primitive array#3104
Merged
robert3005 merged 3 commits intodevelopfrom Apr 29, 2025
Merged
Conversation
There's a annoying side problem here that min == max might still mean that array is non constant but I think it's better than min/max being useless. We might need a function to ask if there's any indefinite values in the array
lwwmanning
reviewed
Apr 24, 2025
Contributor
Author
|
I think there's an interesting balance here in as much as most operations are not interested in nans just like we don't include nulls. Arrow will include NAN and Infinity in min/max calculation and parquet will not. After reading apache/parquet-format#185 and apache/parquet-format#196 I think we should exclude min/max from min/max stats BUT also add a nan_count stat |
Contributor
|
persuasive as to why we'd want to exclude NaNs from stats and have a nan_count (tldr: pruning) -- duckdb/duckdb#16962 |
Merged
gatesn
approved these changes
Apr 29, 2025
AdamGS
pushed a commit
that referenced
this pull request
Apr 30, 2025
In a followup we will add a stat for nan_count of the array fixes #1375
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.
In a followup we will add a stat for nan_count of the array
fixes #1375