mkleen commented on issue #18537: URL: https://github.com/apache/datafusion/issues/18537#issuecomment-3532261595
This works at the SQL level because the Join is then projected, and the duplicated fields are removed accordingly: ```sql create table a(a integer, b integer); insert into a values (1,4), (2,5), (3,6); create table b(a integer, c varchar); insert into b values (1, 'x'), (2, 'y'), (3, 'z'); select * from a inner join b using(a); +---+---+---+ | a | b | c | +---+---+---+ | 1 | 4 | x | | 2 | 5 | y | | 3 | 6 | z | +---+---+---+ 3 row(s) fetched. ``` To make your example work you would need to add a projection on top of the join e.g.: ```rust let projection = LogicalPlanBuilder::from(plan).project(vec![wildcard()]).unwrap().build().unwrap(); ``` Technically, this makes sense because the projection is missing in the code. However, I also understand that it is confusing. -- 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]
