Implement tree explain for DataSourceExec#15029
Merged
comphead merged 6 commits intoapache:mainfrom Mar 6, 2025
Merged
Conversation
39 tasks
alamb
commented
Mar 5, 2025
| DisplayFormatType::Default | DisplayFormatType::Verbose => { | ||
| write!(f, ", has_header={}", self.has_header) | ||
| } | ||
| DisplayFormatType::TreeRender => Ok(()), |
Contributor
Author
There was a problem hiding this comment.
Per the description of TreeRender:
datafusion/datafusion/physical-plan/src/display.rs
Lines 48 to 74 in 3dc212c
TreeRender mode should have only the most relevant details for understanding the high level plan
| } | ||
|
|
||
| write!(f, "partitions={}", partition_sizes.len()) | ||
| let total_rows = self.partitions.iter().map(|b| b.len()).sum::<usize>(); |
Contributor
Author
There was a problem hiding this comment.
Likewise, the previous version is too verbose I think
| 15)│ -------------------- │ | ||
| 16)│ files: 1 │ | ||
| 17)│ format: parquet │ | ||
| 18)│ │ |
Contributor
Author
There was a problem hiding this comment.
I don't know why there is an extra newline here 🤔
DataSourceExec
comphead
reviewed
Mar 5, 2025
comphead
approved these changes
Mar 5, 2025
alamb
commented
Mar 6, 2025
comphead
reviewed
Mar 6, 2025
Contributor
|
Btw I like this simple approach to calc batch sizes, we can also reuse it in #14510 perhaps to sum up all incoming or outcoming batches. |
Contributor
|
Thanks again @alamb |
danila-b
pushed a commit
to danila-b/datafusion
that referenced
this pull request
Mar 8, 2025
* Implement tree explain for DataSourceExec * improve test * Apply suggestions from code review Co-authored-by: Oleks V <[email protected]> * fmt --------- Co-authored-by: Oleks V <[email protected]>
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?
SQL EXPLAINTree Rendering #14914Rationale for this change
SQL EXPLAINTree Rendering #14914We want to have nice explain plans for users. Let's add some detail to the
DataSourceExecWhat changes are included in this PR?
DataSourceandFileSourceAre these changes tested?
yes
Are there any user-facing changes?