-
Couldn't load subscription status.
- Fork 1.7k
Fix SortPreservingMergeExec tree formatting with limit
#18009
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
Fix SortPreservingMergeExec tree formatting with limit
#18009
Conversation
1b56fc3 to
8f009a2
Compare
SortPreservingMergeExec tree formatting with limit
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.
Thanks @AdamGS
|
|
||
| if let Some(fetch) = self.fetch { | ||
| writeln!(f)?; | ||
| writeln!(f, "limit={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.
I wonder if the last one should be just write! rather than writeln! 🤔
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.
Alternatively, we could move the previous logic before the PhysicalSortExec iteration, which would be more intuitive.
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.
@Weijun-H took your suggestion, definitely cleaner
8f009a2 to
3fac54b
Compare
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.
LGTM! Thanks @AdamGS
Which issue does this PR close?
SortPreservingMergeExectree formatting with limit is missing a new line #18008.The PR is split into two commits, the first one includes a passing test that shows the bug, and the second PR fixes the formatting and the test.
Rationale for this change
Fixes tree formatting for
SortPreservingMergeExecWhat changes are included in this PR?
Fix tree formatting for
SortPreservingMergeExecand add a test for the behavior.Are these changes tested?
A new slt test
Are there any user-facing changes?
Only if a user asserts the tree-display in this case.