jayzhan211 commented on PR #15281: URL: https://github.com/apache/datafusion/pull/15281#issuecomment-2765965510
> I'm not sure if I misunderstood something. The fields on both sides of the `=` here come from two tables. I think this is similar to SELECT * FROM A t1, A t2 where t1.id = t2.id + 1 > > Assuming the data in table T is: > > ``` > A.id > 1 > 2 > ``` > > Assuming this isn't optimized as a HashJoin, during the Join, the Cartesian product result should be: > > ``` > t1.id t2.id > 1 1 > 1 2 > 2 1 > 2 2 > ``` > > The final output result would be: > > ``` > t1.id t2.id > 1 2 > ``` > > In this scenario, t1 and t2 originate from the same column, but "t1.id = t2.id + 1" cannot be equivalent to false. Is this situation similar to what occurs in correlated queries? So I'm not sure how to implement this optimization during LogicalPlan Alright, it is join like equality not row by row -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org