-
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
Minor: reduce code duplication in PruningPredicate test #8441
Conversation
cd9a6ef
to
1a352dd
Compare
vec![Some(0), Some(4), None, Some(3)], // min | ||
vec![Some(5), Some(6), Some(4), None], // max | ||
|
||
prune_with_expr( |
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.
The idea is to reduce the boiler plate required to setup the test / prune the expression, and simply list the data and expected results. It may not be many less lines, but the logic is significantly less dense in my opinion
cc @yahoNanJing @crepererum do you have time to review this PR? |
@Ted-Jiang I wonder if you have some time to review this PR? |
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 think the good about prune_with_expr
is it makes the test more readable, thought the lines are not reduced.
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 @viirya and @Ted-Jiang |
Which issue does this PR close?
Follow on to #8440
Rationale for this change
I made a function that was more concise and easier to understand than current tests which have substantial duplication, as part of #8440, but wanted to keep that PR as small as possible to make review easier.
What changes are included in this PR?
prune_with_expr
to reduce code duplicationAre these changes tested?
all tests
Are there any user-facing changes?