-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Implement tree
explain for FilterExec
#15001
Conversation
05)│ FilterExec │ | ||
06)│ -------------------- │ | ||
07)│ predicate: │ | ||
08)│string_col@1 != foo AND ...│ |
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.
This is a very nice case for // TODO: check every line is less than MAX_LINE_RENDER_SIZE
. In DuckDB, we can get the following result:
D explain select * from t1 where c != 'foo' and c != 'bar' and c != 'a really long string constant';
┌─────────────────────────────┐
│┌───────────────────────────┐│
││ Physical Plan ││
│└───────────────────────────┘│
└─────────────────────────────┘
┌───────────────────────────┐
│ SEQ_SCAN │
│ ──────────────────── │
│ Table: t1 │
│ Type: Sequential Scan │
│ Projections: c │
│ │
│ Filters: │
│ c!='foo' AND c!='bar' AND │
│ c!='a really long string │
│ constant' │
│ │
│ ~1 Rows │
└───────────────────────────┘
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 will try to make it the same as DuckDB later.
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.
Awesome -- thank you. Maybe we can file a ticket to track the idea?
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.
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.
👍🏼
Thank you very much for the reviews @irenjj and @2010YOUY01
|
@@ -330,8 +330,7 @@ impl DisplayAs for FilterExec { | |||
write!(f, "FilterExec: {}{}", self.predicate, display_projections) | |||
} | |||
DisplayFormatType::TreeRender => { | |||
// TODO: collect info | |||
write!(f, "") | |||
write!(f, "predicate={}", self.predicate) |
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.
For anyone else following along, this is what it takes to implement the tree
format for FilterExec
The rest of the PR is comments and tests
Which issue does this PR close?
tree
explain forFilterExec
#15000SQL EXPLAIN
Tree Rendering #14914Rationale for this change
Let's have nice explain plans!
I wanted an example of how to make a tree explain plan so that I can file a bunch of follow on tickets for #14914 to share the work
What changes are included in this PR?
ExplainFormat
FilterExec
Are these changes tested?
Yes
Are there any user-facing changes?
tree explain is better