-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Implement tree
explain for SortExec
#15077
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
Conversation
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.
LTGM, thank you. I left a small suggestion on fields name.
} | ||
DisplayFormatType::TreeRender => match self.fetch { | ||
Some(fetch) => { | ||
writeln!(f, "fetch={fetch}")?; |
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.
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) |
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.
sort keys?
06)│ sort keys: │ | ||
07)│ [string_col@1 ASC NULLS │ | ||
08)│ LAST] │ |
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.
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)└─────────────┬─────────────┘
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.
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
I merged up to resolve a conflict |
Which issue does this PR close?
tree
explain forSortExec
#15076Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?