Skip to content

Minor: include output partition count of RepartitionExec to tree explain #15717

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

Merged
merged 2 commits into from
Apr 16, 2025

Conversation

2010YOUY01
Copy link
Contributor

Which issue does this PR close?

  • Closes #.

Rationale for this change

Now output partition count is displayed inside () after partition scheme like RoundRobin

13)┌─────────────┴─────────────┐
14)│      RepartitionExec      │
15)│    --------------------   │
16)│   input_partition_count:  │
17)│             1             │
18)│                           │
19)│    partitioning_scheme:   │
20)│     RoundRobinBatch(4)    │
21)└─────────────┬─────────────┘

This number's meaning is not obvious, this PR let this output partition count to be displayed separately

13)┌─────────────┴─────────────┐
14)│      RepartitionExec      │
15)│    --------------------   │
16)│   input_partition_count:  │
17)│             1             │
18)│                           │
19)│  output_partition_count:  │
20)│             4             │
21)│                           │
22)│    partitioning_scheme:   │
23)│     RoundRobinBatch(4)    │
24)└─────────────┬─────────────┘

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Apr 15, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Makes sense to me -- thank you @2010YOUY01

One thought i had was to make this even more concise by putting input / output partition counts on a single line

So instead of

39)┌─────────────┴─────────────┐
40)│      RepartitionExec      │
41)│    --------------------   │
42)│   input_partition_count:  │
43)│             1             │
44)│                           │
45)│  output_partition_count:  │
46)│             4             │
47)│                           │
48)│    partitioning_scheme:   │
49)│     RoundRobinBatch(4)    │
50)└─────────────┬─────────────┘

More like

39)┌─────────────┴─────────────┐
40)│      RepartitionExec      │
41)│    --------------------   │
42)│   partition_count(in->out):  │
43)│             1 -> 4             │
48)│    partitioning_scheme:   │
49)│     RoundRobinBatch(4)    │
50)└─────────────┬─────────────┘

Copy link
Contributor

@getChan getChan left a comment

Choose a reason for hiding this comment

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

could you update docs/source/user-guide/sql/explain.md?
then I will close #15710

@2010YOUY01
Copy link
Contributor Author

Makes sense to me -- thank you @2010YOUY01

One thought i had was to make this even more concise by putting input / output partition counts on a single line

So instead of

39)┌─────────────┴─────────────┐
40)│      RepartitionExec      │
41)│    --------------------   │
42)│   input_partition_count:  │
43)│             1             │
44)│                           │
45)│  output_partition_count:  │
46)│             4             │
47)│                           │
48)│    partitioning_scheme:   │
49)│     RoundRobinBatch(4)    │
50)└─────────────┬─────────────┘

More like

39)┌─────────────┴─────────────┐
40)│      RepartitionExec      │
41)│    --------------------   │
42)│   partition_count(in->out):  │
43)│             1 -> 4             │
48)│    partitioning_scheme:   │
49)│     RoundRobinBatch(4)    │
50)└─────────────┬─────────────┘

I also prefer this single-line format, updated

@2010YOUY01
Copy link
Contributor Author

could you update docs/source/user-guide/sql/explain.md? then I will close #15710

I found it's not easy to update (and I don't think it's necessary to keep it in sync)

@alamb alamb merged commit a274f1e into apache:main Apr 16, 2025
27 checks passed
@alamb
Copy link
Contributor

alamb commented Apr 16, 2025

Thanks @2010YOUY01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants