-
Notifications
You must be signed in to change notification settings - Fork 1.5k
consolidate physical_optimizer tests into core/tests/physical_optimizer #14244
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
consolidate physical_optimizer tests into core/tests/physical_optimizer #14244
Conversation
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.
All the code in t
@@ -0,0 +1,306 @@ | |||
|
|||
use datafusion_common::config::ConfigOptions; |
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.
Moved into its own file for consistency. If people like this pattern I can do it for the other tests too
@@ -1236,3 +1239,828 @@ async fn test_not_replaced_with_partial_sort_for_bounded_input() -> Result<()> { | |||
assert_optimized!(expected_input, expected_no_change, physical_plan, false); | |||
Ok(()) | |||
} | |||
|
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 moved all the tests for the EnforceSorting pass into the same module along side a bunch of existing tests. I think this will make evaluating the coverage of EnforceSorting easier to understand
@@ -147,314 +147,4 @@ fn take_optimizable_value_from_statistics( | |||
value.map(|val| (val, agg_expr.name().to_string())) | |||
} | |||
|
|||
#[cfg(test)] |
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 simply moved the tests around
@@ -1,861 +0,0 @@ | |||
// Licensed to the Apache Software Foundation (ASF) under one |
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 was consolidated with the exsiting enforce_sorting.rs
tests (same for the others below)
If this is an acceptable change, as a follow on PR I will move the tests from
I was just trying to limit the size of 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.
LGTM
I shared my comments in #14243 |
Thanks @berkaysynnada -- I think your idea is great (see #14243 (comment)) I also think this PR is an incremental step towards your plan, so we could potentially:
Thanks again! |
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.
Plan is set, I'm merging this
Thanks @berkaysynnada |
Move tests
Which issue does this PR close?
EnforceDistribution
intodatafusion-physical-optimizer
crate #14190Part of - [EPIC] Extract remaining physical optimizer out of core #11502
Rationale for this change
Now that we have migrated the physical optimizer tests over, @berkaysynnada and @logan-keede made the modules smaller and easier to manage by putting the tests into separate integration test
Let's keep the rest of the tests following the same pattern and consolidate them with the existing files
What changes are included in this PR?
physical_optimizer_integration
, which is consistent withoptimizer_integration
,sql_integration
, etcAre these changes tested?
Yes by CI. You can run them via
cargo test --test core_integration
Are there any user-facing changes?