Fix pruning on not equal predicate#561
Merged
alamb merged 4 commits intoapache:masterfrom Jun 14, 2021
Merged
Conversation
alamb
commented
Jun 14, 2021
|
|
||
| let p = PruningPredicate::try_new(&expr, schema).unwrap(); | ||
| let result = p.prune(&statistics).unwrap(); | ||
| let expected = vec![true, true, true, true, true]; |
Contributor
Author
There was a problem hiding this comment.
On master this test fails thusly:
---- physical_optimizer::pruning::tests::prune_not_eq_data stdout ----
thread 'physical_optimizer::pruning::tests::prune_not_eq_data' panicked at 'assertion failed: `(left == right)`
left: `[false, true, true, false, true, true]`,
right: `[true, true, true, false, true, true]`', datafusion/src/physical_optimizer/pruning.rs:1218:9
Contributor
Author
There was a problem hiding this comment.
(aka it incorrectly prunes out the range of A -> Z)
Contributor
Author
|
fyi @jgoday |
Dandandan
approved these changes
Jun 14, 2021
Contributor
Dandandan
left a comment
There was a problem hiding this comment.
Great that this was caught by InfluxDB tests, seems correct now to me.
Contributor
Contributor
Author
No worries @jgoday -- both @Dandandan and I missed it on the review as well! This is tricky stuff |
Dandandan
reviewed
Jun 14, 2021
Dandandan
reviewed
Jun 14, 2021
unkloud
pushed a commit
to unkloud/datafusion
that referenced
this pull request
Mar 23, 2025
* remove unsafe uses of from_raw_parts from crc32 and murmur hash functions * remove unused hash_utils.rs
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 #560
Rationale for this change
Logic is incorrect. The only way we can tell for sure that a predicate of
col != literalis always false, is if both the min and max areliteral(aka there is a single value in the column)What changes are included in this PR?