-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Optionally display schema in explain plan #11177
Conversation
InitialPhysicalPlanWithStats, | ||
), | ||
); | ||
// Show statistics + schema in verbose output even if not |
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.
The amount of code required for this change is unfortunate, and I am sure we could make it better, but it was pretty mechanical
EXPLAIN SELECT a, b, c FROM simple_explain_test; | ||
---- | ||
logical_plan TableScan: simple_explain_test projection=[a, b, c] | ||
physical_plan CsvExec: file_groups={1 group: [[WORKSPACE_ROOT/datafusion/core/tests/data/example.csv]]}, projection=[a, b, c], has_header=true, schema=[a:Int32;N, b:Int32;N, c:Int32;N] |
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 shows how the schema is displayed (schema=[[a:Int32;N, b:Int32;N, c:Int32;N]]
)
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 for the review @jayzhan211 |
Which issue does this PR close?
Closes #11176
Rationale for this change
In the context of:
StringView
in DataFusion #10918I have been contemplating adding optimizations that changes DataTypes between certain operators (e.g. to DictionaryArray or StringArray)
Thus I would like to be able to see the schema in the query plans as part of that project
What changes are included in this PR?
set datafusion.explain.show_schema = true;
optionAre these changes tested?
Yes
Are there any user-facing changes?
A new config option and more information in verbose explain plans