Commit e68143a
authored
fix(optimizer): Fix local exchange for merge join (#26590)
## Description
Current code will try to add a round robin local exchange below the
merge join node, which will break the sorted property of the input. In
this PR, we fixed it.
## Motivation and Context
Bug fix
## Impact
Bug fix
## Test Plan
Unit test
## Contributor checklist
- [ ] Please make sure your submission complies with our [contributing
guide](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md),
in particular [code
style](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#code-style)
and [commit
standards](https://github.com/prestodb/presto/blob/master/CONTRIBUTING.md#commit-standards).
- [ ] PR description addresses the issue accurately and concisely. If
the change is non-trivial, a GitHub Issue is referenced.
- [ ] Documented new properties (with its default value), SQL syntax,
functions, or other functionality.
- [ ] If release notes are required, they follow the [release notes
guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines).
- [ ] Adequate tests were added if applicable.
- [ ] CI passed.
- [ ] If adding new dependencies, verified they have an [OpenSSF
Scorecard](https://securityscorecards.dev/#the-checks) score of 5.0 or
higher (or obtained explicit TSC approval for lower scores).
## Release Notes
Please follow [release notes
guidelines](https://github.com/prestodb/presto/wiki/Release-Notes-Guidelines)
and fill in the release notes below.
```
== NO RELEASE NOTE ==
```1 parent 7782e51 commit e68143a
File tree
3 files changed
+17
-17
lines changed- presto-hive/src/test/java/com/facebook/presto/hive
- presto-main-base/src
- main/java/com/facebook/presto/sql/planner/optimizations
- test/java/com/facebook/presto/sql/planner
3 files changed
+17
-17
lines changedLines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
179 | 183 | | |
180 | 184 | | |
181 | 185 | | |
182 | | - | |
| 186 | + | |
| 187 | + | |
183 | 188 | | |
184 | 189 | | |
185 | 190 | | |
| |||
211 | 216 | | |
212 | 217 | | |
213 | 218 | | |
214 | | - | |
| 219 | + | |
| 220 | + | |
215 | 221 | | |
216 | 222 | | |
217 | 223 | | |
| |||
Lines changed: 5 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| |||
893 | 892 | | |
894 | 893 | | |
895 | 894 | | |
896 | | - | |
897 | | - | |
898 | | - | |
899 | | - | |
900 | | - | |
901 | | - | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
902 | 900 | | |
903 | 901 | | |
904 | 902 | | |
| |||
Lines changed: 4 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
558 | 558 | | |
559 | 559 | | |
560 | 560 | | |
561 | | - | |
562 | | - | |
| 561 | + | |
563 | 562 | | |
564 | 563 | | |
565 | 564 | | |
| |||
574 | 573 | | |
575 | 574 | | |
576 | 575 | | |
577 | | - | |
578 | | - | |
| 576 | + | |
579 | 577 | | |
580 | 578 | | |
581 | 579 | | |
582 | 580 | | |
583 | 581 | | |
584 | 582 | | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
| 583 | + | |
| 584 | + | |
589 | 585 | | |
590 | 586 | | |
591 | 587 | | |
| |||
0 commit comments