-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
parquet: Add tests for page pruning on unsigned integers #9888
Conversation
#[tokio::test] | ||
async fn [<prune_uint $bits _scalar_fun_and_eq >]() { | ||
test_prune( | ||
Scenario::UInt, | ||
&format!("SELECT * FROM t where power(u{}, 2) = 36 and u{} = 6", $bits, $bits), | ||
Some(0), | ||
Some(15), | ||
1, | ||
) | ||
.await; | ||
} | ||
|
||
#[tokio::test] | ||
async fn [<prune_uint $bits _scalar_fun >]() { | ||
test_prune( | ||
Scenario::UInt, | ||
&format!("SELECT * FROM t where power(u{}, 2) = 25", $bits), | ||
Some(0), | ||
Some(0), | ||
2, | ||
) | ||
.await; | ||
} |
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.
abs()
doesn't really make sense on unsigned integers, so I replaced it with power()
when adapting from signed integer tests
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.
makes sense to me
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.
👨🍳 👌 -- thank you @progval . Very nice sequence of tests
paste::item! { | ||
#[tokio::test] | ||
// null count min max | ||
// page-0 0 0 4 |
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.
I was confused at first, but the make_uint_batches(0, 5)
returns 0..5
which has a max of 4. ✅
#[tokio::test] | ||
async fn [<prune_uint $bits _scalar_fun_and_eq >]() { | ||
test_prune( | ||
Scenario::UInt, | ||
&format!("SELECT * FROM t where power(u{}, 2) = 36 and u{} = 6", $bits, $bits), | ||
Some(0), | ||
Some(15), | ||
1, | ||
) | ||
.await; | ||
} | ||
|
||
#[tokio::test] | ||
async fn [<prune_uint $bits _scalar_fun >]() { | ||
test_prune( | ||
Scenario::UInt, | ||
&format!("SELECT * FROM t where power(u{}, 2) = 25", $bits), | ||
Some(0), | ||
Some(0), | ||
2, | ||
) | ||
.await; | ||
} |
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.
makes sense to me
Which issue does this PR close?
Closes #9887.
Rationale for this change
What changes are included in this PR?
New test scenario, new tests adapted from the signed integer tests
Are these changes tested?
yes
Are there any user-facing changes?
no