-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix pruning on not equal predicate #561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| let p = PruningPredicate::try_new(&expr, schema).unwrap(); | ||
| let result = p.prune(&statistics).unwrap(); | ||
| let expected = vec![true, true, true, true, true]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(aka it incorrectly prunes out the range of A -> Z)
|
fyi @jgoday |
Dandandan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great that this was caught by InfluxDB tests, seems correct now to me.
No worries @jgoday -- both @Dandandan and I missed it on the review as well! This is tricky stuff |
* remove unsafe uses of from_raw_parts from crc32 and murmur hash functions * remove unused hash_utils.rs
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?