datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Use SortMergeJoinExec consistently in physical plan outputs

Open xavlee opened this issue 1 month ago • 2 comments

Which issue does this PR close?

#19238

Rationale for this change

SortMergeJoinExec is currently displayed inconsistently across physical plan formats, see join.slt vs. explain_tree.slt.

These examples show that the tree-fmt plan uses SortMergeJoinExec, while the indent-fmt plan uses SortMergeJoin.

Standardizing the operator name improves clarity and aligns with the naming conventions of other execution operators.

What changes are included in this PR?

Updates the DisplayAs implementation for SortMergeJoinExec to output "SortMergeJoinExec: ...".

Updates SQL Logic Test expected outputs in joins.slt to reflect the unified naming.

No functional behavior changes; this is a display/consistency fix.

Are these changes tested?

Yes. This change is encapsulated in existing SQL Logic Tests. I updated those expected outputs to match the new standardized naming.

All tests pass with the updated format.

Are there any user-facing changes?

Yes—users inspecting physical plans will now consistently see SortMergeJoinExec instead of SortMergeJoin.

xavlee avatar Dec 09 '25 20:12 xavlee

cc @alamb @gabotechs : tiny but meaningful

NGA-TRAN avatar Dec 10 '25 00:12 NGA-TRAN

Looks like there is a bunch more test updates that are needed here

alamb avatar Dec 10 '25 14:12 alamb

@xavlee will you be able to finish this PR (resolve the conflicts and update the tests?)

alamb avatar Dec 18 '25 17:12 alamb

I will complete this today, apologies for the delay.

xavlee avatar Dec 18 '25 17:12 xavlee

@alamb I've rebased my changes and resolved conflicts 🙏 . You mentioned there were other tests that may also have to be updated–should I open a separate PR to address those?

xavlee avatar Dec 19 '25 01:12 xavlee

@alamb I've rebased my changes and resolved conflicts 🙏 . You mentioned there were other tests that may also have to be updated–should I open a separate PR to address those?

I kicked CI so let's see if there are any tests that expect specific node names. Those would be tests that need updating. Thanks for your contribution so far!

mbutrovich avatar Dec 19 '25 01:12 mbutrovich

Got it, I'll update those tests as well

xavlee avatar Dec 19 '25 02:12 xavlee