-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Migrate core test to insta part 3 #16978
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
Migrate core test to insta part 3 #16978
Conversation
16959ba to
5cb1e98
Compare
…namic snapshot assertions
5cb1e98 to
0e07645
Compare
alamb
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.
Thank you for this PR @Chen-Yuan-Lai -- unfortuately I am not likely going to be able to find the contiguous time needed to review a PR this large.
I wonder if you would be willing to help make it easier to review, by splitting it up into smaller PRs ?
Also I think the structure of some of these tests is pretty gnarly to begin with (e.g. macros with many parameters). Maybe we can work out a better pattern as part of this work if we are going to rewrite the whole thing anyways
Maybe we can try to port a few tests in one of the files to use iinsta to make sure we are good with the pattern before applying the pattern to the entire thing
For example, a more explicit Test style struct might make the options being tested more efficient.
I know this is a big ask, but I think getting these tests into better shape would really help the project
| /// when the flag `prefer_existing_sort` is `true` for bounded cases. | ||
| /// * `$PLAN`: The plan to optimize. | ||
| /// * `$SOURCE_UNBOUNDED`: Whether the given plan contains an unbounded source. | ||
| macro_rules! assert_optimized_in_all_boundedness_situations { |
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.
oh yeah, I remember this macro -- this is crazy
Sure! I will try it soon |
|
Thank you so much @Chen-Yuan-Lai |
|
Any idea if you will be able to split this PR into smaller pieces @Chen-Yuan-Lai ? I can try to get an AI agent to do it too if you prefer |
|
@alamb Sure, feel free to use an AI agent to split this PR! Sorry for the long delay - I've been short on time. Thanks for offering to help with this! |
# Conflicts: # datafusion/core/tests/physical_optimizer/enforce_distribution.rs
|
Resolved one minor conflict |
happy to do the split too! |
that would be great too -- thank you ! |
|
I ported part of the sort_enforcement tests here: |
# Conflicts: # datafusion/core/tests/physical_optimizer/enforce_sorting.rs # datafusion/core/tests/physical_optimizer/partition_statistics.rs
|
i'll chunk this into more prs |
😍 |
|
I'll prioritize getting them reviewed |
# Conflicts: # datafusion/core/tests/physical_optimizer/replace_with_order_preserving_variants.rs
|
🚀 |
|
Amazing -- thanks for pushing it over the line @blaginin |
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes apache#123` indicates that this PR will close issue apache#123. --> - Part of apache#15791 . ## Rationale for this change <!-- Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed. Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes. --> Related apache#16324 apache#16617 ## What changes are included in this PR? <!-- There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR. --> ## Are these changes tested? <!-- We typically require tests for all PRs in order to: 1. Prevent the code from being accidentally broken by subsequent changes 2. Serve as another way to document the expected behavior of the code If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## Are there any user-facing changes? <!-- If there are user-facing changes then we may require documentation to be updated before approving the PR. --> <!-- If there are any breaking changes to public APIs, please add the `api change` label. --> No --------- Co-authored-by: Ian Lai <Ian.Lai@senao.com> Co-authored-by: Cheng-Yuan-Lai <a186235@g,ail.com> Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org> Co-authored-by: blaginin <dmitrii@blaginin.me>
- Closes apache#15791 - Closes apache#15178 🥳 - Surpasses part of apache#16978 --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Which issue does this PR close?
coretests toinsta#15791 .Rationale for this change
Related #16324 #16617
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?
No