Skip to content

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Oct 3, 2025

Which issue does this PR close?

Rationale for this change

I found that the enforce_sorting tests need many updates (b/c the plan output
changed) while working on the arrow 57 upgrade, and I am trying to make the
enforce_sorting tests easier to maintain.

At the moment the module is huge (almost 4000 lines) it is totally unobvious (to me) that there are two macros called
"assert_optimized_plan" in enforce_sorting.rs and there is one giant test test function
with many cases in it.

I will refactor it in a follow on PR; The first step is to split the test
into its own module.

What changes are included in this PR?

Move test_window_partial_constant_and_set_monotonicity into its own module

Are these changes tested?

Yes, by CI

Are there any user-facing changes?

no this is a development process nly

@github-actions github-actions bot added the core Core DataFusion crate label Oct 3, 2025
@@ -1652,94 +1647,6 @@ async fn test_not_replaced_with_partial_sort_for_bounded_input() -> Result<()> {
Ok(())
}

/// Runs the sort enforcement optimizer and asserts the plan
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just moved 1200 lines of test code into a different module. I did not change any of the test logic

@alamb alamb marked this pull request as ready for review October 3, 2025 16:17
@alamb alamb requested a review from berkaysynnada October 3, 2025 17:20
@alamb
Copy link
Contributor Author

alamb commented Oct 3, 2025

@berkaysynnada I wonder if you have time to review this PR (I think it should be fairly simple as it just moves code around)

@blaginin blaginin self-requested a review October 4, 2025 17:55
@blaginin
Copy link
Contributor

blaginin commented Oct 4, 2025

I refactored it in #17900 (but didn't move to the new file to speed up the review)

@alamb
Copy link
Contributor Author

alamb commented Oct 6, 2025

Closing in favor of #17900

Thank you @blaginin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants