alamb commented on issue #1049:
URL:
https://github.com/apache/arrow-datafusion/issues/1049#issuecomment-933352649
For the record, here is what postgres does (accepts this query)
```
alamb=# create table simple(c1 int, c2 int, c3 int);
CREATE TABLE
alamb=# explain select * from public.simple as a join (select * from
public.simple) as b on a.c3=b.c3;
QUERY PLAN
-------------------------------------------------------------------------
Merge Join (cost=285.08..607.40 rows=20808 width=24)
Merge Cond: (a.c3 = simple.c3)
-> Sort (cost=142.54..147.64 rows=2040 width=12)
Sort Key: a.c3
-> Seq Scan on simple a (cost=0.00..30.40 rows=2040 width=12)
-> Sort (cost=142.54..147.64 rows=2040 width=12)
Sort Key: simple.c3
-> Seq Scan on simple (cost=0.00..30.40 rows=2040 width=12)
(8 rows)
alamb=# select * from public.simple as a join (select * from public.simple)
as b on a.c3=b.c3;
c1 | c2 | c3 | c1 | c2 | c3
----+----+----+----+----+----
(0 rows)
alamb=#
```
--
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]