Skip to content

feat: Allow tree explain format width to be customizable#16827

Merged
alamb merged 1 commit into
apache:mainfrom
nuno-faria:fix_tree_render
Jul 22, 2025
Merged

feat: Allow tree explain format width to be customizable#16827
alamb merged 1 commit into
apache:mainfrom
nuno-faria:fix_tree_render

Conversation

@nuno-faria

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

  • N/A.

Rationale for this change

Allows larger plans to be fully rendered in the tree format with the datafusion.explain.tree_maximum_render_width config.

Also fixes a bug with the tree format that was showing a partial render for larger plans:

  • Before:
    image

  • After:
    image

What changes are included in this PR?

  • Added the datafusion.explain.tree_maximum_render_width config.
  • Updated the display code to use the custom render width.
  • Added sqllogictests.

Are these changes tested?

Yes

Are there any user-facing changes?

The previous render width remains the default value.

- Also fix a bug in the tree format.
@github-actions github-actions Bot added documentation Improvements or additions to documentation core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) common Related to common crate physical-plan Changes to the physical-plan crate labels Jul 19, 2025

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @nuno-faria -- this looks good to me

@xudong963 xudong963 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very helpful, thank you / cc @irenjj

@irenjj irenjj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @nuno-faria

@alamb
alamb merged commit a0ce581 into apache:main Jul 22, 2025
28 checks passed
@nuno-faria
nuno-faria deleted the fix_tree_render branch July 22, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to common crate core Core DataFusion crate documentation Improvements or additions to documentation physical-plan Changes to the physical-plan crate sqllogictest SQL Logic Tests (.slt)

4 participants