Implement tree explain for FilterExec#15001
Merged
alamb merged 1 commit intoapache:mainfrom Mar 5, 2025
Merged
Conversation
39 tasks
irenjj
reviewed
Mar 4, 2025
| 05)│ FilterExec │ | ||
| 06)│ -------------------- │ | ||
| 07)│ predicate: │ | ||
| 08)│string_col@1 != foo AND ...│ |
Contributor
There was a problem hiding this comment.
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 │
└───────────────────────────┘
Contributor
There was a problem hiding this comment.
I will try to make it the same as DuckDB later.
Contributor
Author
There was a problem hiding this comment.
Awesome -- thank you. Maybe we can file a ticket to track the idea?
Contributor
Author
There was a problem hiding this comment.
Contributor
Author
|
Thank you very much for the reviews @irenjj and @2010YOUY01
|
This was referenced Mar 5, 2025
alamb
commented
Mar 5, 2025
| DisplayFormatType::TreeRender => { | ||
| // TODO: collect info | ||
| write!(f, "") | ||
| write!(f, "predicate={}", self.predicate) |
Contributor
Author
There was a problem hiding this comment.
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
danila-b
pushed a commit
to danila-b/datafusion
that referenced
this pull request
Mar 8, 2025
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 forFilterExec#15000SQL EXPLAINTree 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?
ExplainFormatFilterExecAre these changes tested?
Yes
Are there any user-facing changes?
tree explain is better