-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: support correlated subqueries #3288
Copy link
Copy link
Closed
Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-semanticsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
Milestone
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-sql-optimizerSQL logical planning and optimizations.SQL logical planning and optimizations.A-sql-pgcompatSemantic compatibility with PostgreSQLSemantic compatibility with PostgreSQLA-sql-semanticsC-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)