Repository navigation
Commit d681fc5
fix: map remaining union input by position in propagate_empty_relation
When propagate_empty_relation removes all but one input of a Union, it
put a Projection over the remaining input with Projection::new_from_schema.
That made column references from the union's field names, which come from
the first input. If a later input remained and had other names, the
projection referred to columns that did not exist, and optimize_projections
failed with "No field named ...".
Map the remaining input's columns to the union's fields by position and
build the projection with Projection::try_new.
Closes apache#26516.
Co-Authored-By: Claude Opus 5.5 <[email protected]>1 parent 6c1727f commit d681fc5
2 files changed
Lines changed: 60 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
213 | 226 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
| 227 | + | |
218 | 228 | | |
219 | 229 | | |
220 | 230 | | |
| |||
439 | 449 | | |
440 | 450 | | |
441 | 451 | | |
442 | | - | |
| 452 | + | |
| 453 | + | |
443 | 454 | | |
444 | 455 | | |
445 | 456 | | |
| |||
529 | 540 | | |
530 | 541 | | |
531 | 542 | | |
532 | | - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
533 | 571 | | |
534 | 572 | | |
535 | 573 | | |
| |||
813 | 851 | | |
814 | 852 | | |
815 | 853 | | |
816 | | - | |
| 854 | + | |
817 | 855 | | |
818 | 856 | | |
819 | 857 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1144 | 1144 | | |
1145 | 1145 | | |
1146 | 1146 | | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
1147 | 1162 | | |
1148 | 1163 | | |
1149 | 1164 | | |
0 commit comments