Implement tree explain for SortExec#15077
Merged
alamb merged 5 commits intoapache:mainfrom Mar 9, 2025
Merged
Conversation
2010YOUY01
approved these changes
Mar 8, 2025
Contributor
2010YOUY01
left a comment
There was a problem hiding this comment.
LTGM, thank you. I left a small suggestion on fields name.
| } | ||
| DisplayFormatType::TreeRender => match self.fetch { | ||
| Some(fetch) => { | ||
| writeln!(f, "fetch={fetch}")?; |
Contributor
There was a problem hiding this comment.
Suggested change
| writeln!(f, "fetch={fetch}")?; | |
| writeln!(f, "limit={fetch}")?; |
I think fetch is more often to be used in implementation, at plan level maybe 'limit' is better 🤔
| DisplayFormatType::TreeRender => match self.fetch { | ||
| Some(fetch) => { | ||
| writeln!(f, "fetch={fetch}")?; | ||
| writeln!(f, "sort=[{}]", self.expr) |
alamb
approved these changes
Mar 8, 2025
Comment on lines
+557
to
+559
| 06)│ sort keys: │ | ||
| 07)│ [string_col@1 ASC NULLS │ | ||
| 08)│ LAST] │ |
Contributor
There was a problem hiding this comment.
I wonder if there is some way to avoid the redundancy of sort keys 🤔
For example I think this would be look better (not sure how to do it)
01)┌───────────────────────────┐
02)│ SortExec │
03)│ -------------------- │
07)│ string_col@1 ASC NULLS │
08)│ LAST │
05)│ │
04)│ limit: 1 │
09)└─────────────┬─────────────┘
Contributor
Author
There was a problem hiding this comment.
We need to handle cases that are not in KV format. Other prs may have similar issues too, maybe we can handle it in the next pr, filed: #15098
Contributor
|
I merged up to resolve a conflict |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
treeexplain forSortExec#15076Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?