Display: Support `preserve_partitioning` on SortExec physical plan.
Which issue does this PR close?
Closes #10138
Rationale for this change
Display of SortExec execution plan doesn't have visibility on preserve_partitioning field
SortExec: TopK(fetch=10000), expr=[NASME@0 ASC,VISITS@1 DESC NULLS LAST]
What changes are included in this PR?
Only important change made in this PR is
Display of SortExec execution plan now support preserve_partitioning field
SortExec: TopK(fetch=10000), expr=[NASME@0 ASC,VISITS@1 DESC NULLS LAST], preserve_partitioning=[true]
Everything 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.sltfiles except ones fromtpchbenchmarks - Generate
tpchbenchmarks data using steps mentioned here. -
INCLUDE_TPCH=true cargo test --test sqllogictests -- --complete- to updatetpchbenchmarks tests outputs.
Are these changes tested?
Yes
Are there any user-facing changes?
May be, if user try to format the Sort execution plan.
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
@alamb thanks for the suggestion 👍 . Quick follow up. That command you mentioned sqllogictests --complete only updates the .slt files that are part of datafusion/sqllogictest crate itself.
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 :)
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