Repository navigation
Commit 66388fc
fix: Ensure columns are casted to the correct names with Unions (apache#20146) (#127)
UPSTREAM NOTE: not required, DF original PR: from apache#20146
## Which issue does this PR close?
- Closes apache#20123.
## Rationale for this change
When aliasing a cast, use the original name to prevent duplicate column
names errors.
## What changes are included in this PR?
- Updated `coerce_exprs_for_schema` to use the correct name.
- Updated tests.
## Are these changes tested?
Yes.
## Are there any user-facing changes?
No.
# Conflicts:
# datafusion/expr/src/expr_rewriter/mod.rs
# datafusion/optimizer/tests/optimizer_integration.rs
# datafusion/substrait/tests/cases/logical_plans.rs
Co-authored-by: Nuno Faria <[email protected]>1 parent ad4bf66 commit 66388fc
2 files changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
265 | | - | |
266 | | - | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
267 | 274 | | |
268 | 275 | | |
269 | 276 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
546 | | - | |
| 546 | + | |
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | | - | |
| 570 | + | |
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
633 | | - | |
| 633 | + | |
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| |||
0 commit comments