Describe the bug
Join two tables with the same schema, then union throws SchemaError(DuplicateUnqualifiedField )
To Reproduce
create table ta(a bigint) as values(1);
create table tb(a bigint) as values(2);
select * from ta join tb on true
union all
select * from ta join tb on true;
SchemaError(DuplicateUnqualifiedField { name: "a" })
Expected behavior
query sucess.
Additional context
datafusion v18.0.0