You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DISCUSS] Switch to tree explain by default #15343
However the current default explain plan that most users will see uses the classic indent mode which includes quite a bit of detail that requires expertise to see and understand the plan (see example below)
Describe the solution you'd like
I would like to discuss using the tree mode by default (if you just run EXPLAIN ...) as that is the first introduction to DataFusion plans for many users.
(and if course I have DuckDB envy many times)
Describe alternatives you've considered
I think we could simply change the default value of datafusion.explain.format to tree
I think the biggest part of this ticket will be updating all the tests
Most tests that use the indent mode should continue to use the indent mode as it contains more information. In other words the tests should not be updated to use the tree mode
Most tests that use the indent mode should continue to use the indent mode as it contains more information. In other words the tests should not be updated to use the tree mode
I think this is very important. We found many bugs using the current, detailed plan print-outs. Let's make the tree mode default for the CLI experience (and tests verifying the CLI behavior), but all the other tests should keep using the current format.
Reacted by Adrian Garcia Badaracco and Andrew Lamb
I think this is very important. We found many bugs using the current, detailed plan print-outs. Let's make the tree mode default for the CLI experience (and tests verifying the CLI behavior), but all the other tests should keep using the current format.
I agree with this, test coverage should not be weakened. Unless we ensure tree format displays at least as much detail as the ident format, test default should be ident format.
Reacted by Adrian Garcia Badaracco and Andrew Lamb
I wonder if we could just change the default format for datafusion-cli (it is a config setting) 🤔 Downstream projects could also then "opt-in" if they wanted nicer default explain plans
I wonder if we could just change the default format for datafusion-cli (it is a config setting) 🤔 Downstream projects could also then "opt-in" if they wanted nicer default explain plans
Makes sense to change the default format for datafusion-cli 👍
Activity
alamb commentedon Mar 21, 2025
For example, here is the plan from a recent query from #15177 (I actually had to trim it to fit in the 65k limit):
I think the
treeexplain format for the same query is much easier to understand:[-]Enable `tree` explain by default[/-][+][DISCUSS] Switch to `tree` explain by default[/+]irenjj commentedon Mar 21, 2025
That's cool,
treemakes EXPLAIN very concise, and we can easily view detailed information usingEXPLAIN FORMAT xxx.adriangb commentedon Mar 21, 2025
Plus one for making it the default :)
xudong963 commentedon Mar 21, 2025
+1
zhuqi-lucas commentedon Mar 21, 2025
+1
ozankabak commentedon Mar 21, 2025
I think this is very important. We found many bugs using the current, detailed plan print-outs. Let's make the tree mode default for the CLI experience (and tests verifying the CLI behavior), but all the other tests should keep using the current format.
berkaysynnada commentedon Mar 21, 2025
I agree with this, test coverage should not be weakened. Unless we ensure tree format displays at least as much detail as the ident format, test default should be ident format.
Omega359 commentedon Mar 21, 2025
I agree with others on the tests, let them continue to use the condensed format. Otherwise I agree with making the tree format the default.
Standing-Man commentedon Mar 22, 2025
I agree to use the tree explanation format as the default display, as it is more concise.
alamb commentedon Mar 22, 2025
I wonder if we could just change the default format for
datafusion-cli(it is a config setting) 🤔 Downstream projects could also then "opt-in" if they wanted nicer default explain plansozankabak commentedon Mar 22, 2025
Makes sense to change the default format for
datafusion-cli👍Weijun-H commentedon Mar 24, 2025
I agree with this change. The
treeformat works well for the explanation.alamb commentedon Mar 26, 2025
Here is a proposed PR:
EXPLAINformat indatafusion-clitotreeformat #15427