-
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
Display: Support preserve_partitioning
on SortExec physical plan.
#10153
Display: Support preserve_partitioning
on SortExec physical plan.
#10153
Conversation
I think you can update the tests using completion mode: https://github.com/apache/datafusion/tree/main/datafusion/sqllogictest#updating-tests-completion-mode That probably will get this PR mostly working |
Fixes: apache#10138 `Display` of SortExec execution plan now support `preserve_partitioning` field Signed-off-by: Kaviraj <[email protected]>
Signed-off-by: Kaviraj <[email protected]>
56b18c7
to
6dbe69a
Compare
Signed-off-by: Kaviraj <[email protected]>
@alamb thanks for the suggestion 👍 . Quick follow up. That command you mentioned I don't see it updates any of the other test cases where we are asserting the physical plan string representation. That still needs manual updates correct (around 79 tests were failing)?. I started updating those, just wanted to check if there are any easy/automated way that I'm not aware of :) |
Signed-off-by: Kaviraj <[email protected]>
Signed-off-by: Kaviraj <[email protected]>
Signed-off-by: Kaviraj <[email protected]>
Signed-off-by: Kaviraj <[email protected]>
@@ -868,11 +868,12 @@ impl DisplayAs for SortExec { | |||
match t { | |||
DisplayFormatType::Default | DisplayFormatType::Verbose => { | |||
let expr = PhysicalSortExpr::format_list(&self.expr); | |||
let preserve_partioning = self.preserve_partitioning; |
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.
NOTE for reviewers: These changes in sort.rs
is the only real change for this PR.
Everything else is just update tests either manually or automatically (see PR description for steps I used to update those)
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 @kavirajk -- this looks like an epic PR (lots of tests to update!)
I think this really improves the readability of the plans and will help make understanding them much easier.
…sical-plan-format
I took the liberty of merging up from main to this branch to ensure we didn't have any logical conflicts (e.g. newly added explain plans for example). I think we can merge it once CI passes |
Thanks again @kavirajk |
Which issue does this PR close?
Closes #10138
Rationale for this change
Display
of SortExec execution plan doesn't have visibility onpreserve_partitioning
fieldWhat changes are included in this PR?
Only important change made in this PR is
Display
of SortExec execution plan now supportpreserve_partitioning
fieldEverything else is either updating tests manually or via some script. Following are the steps I used to update tests automatically (thanks @alamb for the tip)
cargo test --test sqllogictests -- --complete
- that updates all.slt
files except ones fromtpch
benchmarkstpch
benchmarks data using steps mentioned here.INCLUDE_TPCH=true cargo test --test sqllogictests -- --complete
- to updatetpch
benchmarks tests outputs.Are these changes tested?
Yes
Are there any user-facing changes?
May be, if user try to format the Sort execution plan.