Commit 55bfa7d
committed
Skip unnecessary plan rebuild in adjust_input_keys_ordering
When a plan node has no join/aggregate key reordering requirements
(requirements.data is empty) and falls through to the default else
branch, adjust_input_keys_ordering previously returned Transformed::yes
unconditionally. This triggered with_new_children rebuilds on every
node in the tree, even though nothing changed.
Add an early return with Transformed::no when requirements.data is
empty, avoiding unnecessary plan tree rebuilds for non-join plans.1 parent 42cd2fa commit 55bfa7d
3 files changed
Lines changed: 34 additions & 0 deletions
File tree
- datafusion
- core/tests/physical_optimizer
- physical-optimizer/src
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3978 | 3978 | | |
3979 | 3979 | | |
3980 | 3980 | | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
| 3984 | + | |
| 3985 | + | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + | |
| 3989 | + | |
| 3990 | + | |
| 3991 | + | |
| 3992 | + | |
| 3993 | + | |
| 3994 | + | |
| 3995 | + | |
| 3996 | + | |
| 3997 | + | |
| 3998 | + | |
| 3999 | + | |
| 4000 | + | |
| 4001 | + | |
| 4002 | + | |
| 4003 | + | |
| 4004 | + | |
| 4005 | + | |
| 4006 | + | |
| 4007 | + | |
| 4008 | + | |
| 4009 | + | |
| 4010 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
412 | 412 | | |
413 | 413 | | |
414 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
| |||
0 commit comments