-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Implement tree
explain for FilterExec
#15001
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -74,13 +74,16 @@ physical_plan | |
03)└─────────────┬─────────────┘ | ||
04)┌─────────────┴─────────────┐ | ||
05)│ FilterExec │ | ||
06)└─────────────┬─────────────┘ | ||
07)┌─────────────┴─────────────┐ | ||
08)│ RepartitionExec │ | ||
06)│ -------------------- │ | ||
07)│ predicate: │ | ||
08)│ string_col@1 != foo │ | ||
09)└─────────────┬─────────────┘ | ||
10)┌─────────────┴─────────────┐ | ||
11)│ DataSourceExec │ | ||
12)└───────────────────────────┘ | ||
11)│ RepartitionExec │ | ||
12)└─────────────┬─────────────┘ | ||
13)┌─────────────┴─────────────┐ | ||
14)│ DataSourceExec │ | ||
15)└───────────────────────────┘ | ||
|
||
# Aggregate | ||
query TT | ||
|
@@ -185,6 +188,32 @@ physical_plan | |
26)│ DataSourceExec ││ DataSourceExec │ | ||
27)└───────────────────────────┘└───────────────────────────┘ | ||
|
||
# Long Filter (demonstrate what happens with wrapping) | ||
query TT | ||
explain SELECT int_col FROM table1 | ||
WHERE string_col != 'foo' AND string_col != 'bar' AND string_col != 'a really long string constant' | ||
; | ||
---- | ||
logical_plan | ||
01)Projection: table1.int_col | ||
02)--Filter: table1.string_col != Utf8("foo") AND table1.string_col != Utf8("bar") AND table1.string_col != Utf8("a really long string constant") | ||
03)----TableScan: table1 projection=[int_col, string_col], partial_filters=[table1.string_col != Utf8("foo"), table1.string_col != Utf8("bar"), table1.string_col != Utf8("a really long string constant")] | ||
physical_plan | ||
01)┌───────────────────────────┐ | ||
02)│ CoalesceBatchesExec │ | ||
03)└─────────────┬─────────────┘ | ||
04)┌─────────────┴─────────────┐ | ||
05)│ FilterExec │ | ||
06)│ -------------------- │ | ||
07)│ predicate: │ | ||
08)│string_col@1 != foo AND ...│ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a very nice case for
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will try to make it the same as DuckDB later. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
09)└─────────────┬─────────────┘ | ||
10)┌─────────────┴─────────────┐ | ||
11)│ RepartitionExec │ | ||
12)└─────────────┬─────────────┘ | ||
13)┌─────────────┴─────────────┐ | ||
14)│ DataSourceExec │ | ||
15)└───────────────────────────┘ | ||
|
||
|
||
# cleanup | ||
|
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.
For anyone else following along, this is what it takes to implement the
tree
format forFilterExec
The rest of the PR is comments and tests