cockroachdb / cockroach

CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement.
https://www.cockroachlabs.com
Other
30.07k stars 3.8k forks source link

Can't combine lateral join with column and other joins #132554

Open nunoo opened 2 weeks ago

nunoo commented 2 weeks ago

Describe the problem

I am unable to combine lateral join with column and other joins, this works with postgres however

To Reproduce

create table employees(age int, name text);
insert into employees values(25, 'Name1');
insert into employees values(48, 'Name2');

select * from employees, generate_series(1, age)
cross join employees t2

ERROR: column "age" does not exist
SQLSTATE: 42703

Expected behavior

the ability to combine lateral join with column and other joins

Environment:

Jira issue: CRDB-43140

blathers-crl[bot] commented 2 weeks ago

Hi @nunoo, please add branch-* labels to identify which branch(es) this C-bug affects.

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

blathers-crl[bot] commented 2 weeks ago

Hello, I am Blathers. I am here to help you get the issue triaged.

Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here.

I have CC'd a few people who may be able to assist you:

If we have not gotten back to your issue within a few business days, you can try the following:

:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

mgartner commented 2 weeks ago

Thanks for the report! I've confirmed this is a problem on v24.2.0.