You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When joining two columns that were generated with row_number(), a select over cartesian product is generated instead of join.
To Reproduce
create table a(i int);
create table b(i int);
insert into a values (10), (10);
insert into b values (20), (20);
plan
with
a1 as (select row_number() over() as r, i from a),
b1 as (select row_number() over() as r, i from b)
select a1.i, b1.i
from a1, b1
where a1.r = b1.r;
Describe the bug
When joining two columns that were generated with
row_number()
, a select over cartesian product is generated instead of join.To Reproduce
outputs:
Software versions
The text was updated successfully, but these errors were encountered: