nuno-faria commented on PR #20106:
URL: https://github.com/apache/datafusion/pull/20106#issuecomment-3846112333
That's quite the bug!
```
Projection: foo AS col1, bar AS col2
Union
Projection: foo, bar
Values: (Int64(100), Int64(200))
Projection: x, foo
Values: (Int32(300), Int64(400))
```
Because `x` has a different type, it will be casted to `Int64`. In the cast,
an alias is added to the original name. However, in this case `dst_schema` will
not contain the original column names, but rather the names of the first
relation, since this is an union. So the second projection is temporarily `foo`
(casted an alised) and `foo`, hence the duplicate error.
I will try to push a fix soon.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]