Skip to content

sql: support correlated subqueries #3288

@madelynnblue

Description

@madelynnblue

https://github.com/cockroachdb/sqllogictest/blob/a88396b84bb1fe62edf2e072e585d68c0b2ecdca/test/select1.test#L109

Fails with:

logic_test.go:420: ../../sqllogictest/test/select1.test:109: expected success, but found pq: qualified name "x.b" not found

I believe this is because the subquery references both x and t1 (where t1 is from the parent FROM clause), but only x is in the visible tables list.


The description above was conflating two bugs into one. This is a real bug, but it isn't caused by the linked query.

Metadata

Metadata

Assignees

Labels

A-sql-optimizerSQL logical planning and optimizations.A-sql-pgcompatSemantic compatibility with PostgreSQLA-sql-semanticsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions