-
Notifications
You must be signed in to change notification settings - Fork 186
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
feat: Explain for swordfish #3667
Conversation
CodSpeed Performance ReportMerging #3667 will improve performances by 18%Comparing Summary
Benchmarks breakdown
|
@@ -39,7 +39,7 @@ fn fmt_tree_indent_style<'a, W: fmt::Write + 'a>( | |||
|
|||
// Print the tree recursively, and illustrate the tree structure in the same style as `git log --graph`. | |||
// `depth` is the number of forks in this node's ancestors. | |||
fn fmt_tree_gitstyle<'a, W: fmt::Write + 'a>( | |||
pub fn fmt_tree_gitstyle<'a, W: fmt::Write + 'a>( |
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.
So, the physical plan and logical plan don't directly use this function, instead they call plan.fmt_tree()
, which is the function below.
But for swordfish's Box<dyn PipelineNode>
, I'm not sure how to call fmt_tree
because it requires Self : Sized
. So i made fmt_tree_gitstyle
public and just call it directly.
pub trait AsciiTreeDisplay: TreeDisplay {
// // Print the whole tree represented by this node.
fn fmt_tree<'a, W: fmt::Write + 'a>(&self, w: &'a mut W, simple: bool) -> fmt::Result
where
Self: Sized,
{
let level = if simple {
crate::DisplayLevel::Compact
} else {
crate::DisplayLevel::Default
};
fmt_tree_gitstyle(self, 0, w, level)
}
I think @universalmind303 would be a better reviewer for this |
Enable printing swordfish plan in
.explain(show_all=True)
, and adds more detail in explain analyze, e.g. show the estimated stats and then the actual statsExamples (TPCH Q2)
https://github.com/user-attachments/files/18383405/explain-analyze-1736553138856-mermaid.md