Skip to content
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

Implement tree explain for FilterExec #15001

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alamb
Copy link
Contributor

@alamb alamb commented Mar 4, 2025

Which issue does this PR close?

Rationale 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?

  1. Update comments about ExplainFormat
  2. Implement for FilterExec
  3. Update tests

Are these changes tested?

Yes

Are there any user-facing changes?

tree explain is better

@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Mar 4, 2025
@alamb alamb marked this pull request as ready for review March 4, 2025 12:43
05)│ FilterExec │
06)│ -------------------- │
07)│ predicate: │
08)│string_col@1 != foo AND ...│
Copy link
Contributor

Choose a reason for hiding this comment

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

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          │
└───────────────────────────┘

Copy link
Contributor

Choose a reason for hiding this comment

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

I will try to make it the same as DuckDB later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Awesome -- thank you. Maybe we can file a ticket to track the idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement tree explain for FilterExec
2 participants