-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix IsNull
pruning expression generation without null_count statistics
#3044
Conversation
@@ -639,7 +639,7 @@ fn build_is_null_column_expr( | |||
Expr::Column(ref col) => { | |||
let field = schema.field_with_name(&col.name).ok()?; | |||
|
|||
let null_count_field = &Field::new(field.name(), DataType::UInt64, false); | |||
let null_count_field = &Field::new(field.name(), DataType::UInt64, 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.
This is the fix
|
||
// i IS NULL, no null statistics | ||
let expr = col("i").is_null(); | ||
let p = PruningPredicate::try_new(expr, schema.clone()).unwrap(); |
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.
prior to the fix, this line would panic
], | ||
); | ||
|
||
let expected_ret = vec![false, true, true, true, false]; |
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.
This case simply didn't have coverage before that I could find
Codecov Report
@@ Coverage Diff @@
## master #3044 +/- ##
==========================================
+ Coverage 85.85% 85.86% +0.01%
==========================================
Files 286 286
Lines 51670 51704 +34
==========================================
+ Hits 44359 44395 +36
+ Misses 7311 7309 -2
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
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.
LGTM
Thanks for the review @Dandandan |
Benchmark runs are scheduled for baseline = acd1f40 and contender = 6e6f3bf. 6e6f3bf is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
(this is a one line code change PR, the rest is tests)
Which issue does this PR close?
Closes #3042
Rationale for this change
See #3042
What changes are included in this PR?
nullability
annotation correctlyAre there any user-facing changes?