fix(plan): support nested correlated subqueries - #24537
Conversation
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
aunjgr
left a comment
There was a problem hiding this comment.
Review: nested correlated subqueries
Approve.
The deep-correlation handling is constrained to supported subquery types, guards unsafe pull-up cases that still contain inner columns, and appends lifted deep-correlated filters in a controlled way after mark join creation. Added tests cover EXISTS/NOT EXISTS/IN/NOT IN/ANY/ALL nested correlated cases plus an explicit guarded error path.
No blocking issue found.
Merge Queue Status
This pull request spent 59 minutes 5 seconds in the queue, including 58 minutes 37 seconds running CI. Required conditions to merge
|
What type of PR is this?
Which issue(s) this PR fixes:
issue #23110
What this PR does / why we need it:
ANYandALLby allowing their deep correlated predicates to be pulled up.ANY/ALLmark joins, matching the existingEXISTS/INhandling.ANY/ALLsubqueries.Validation:
go test ./pkg/sql/plan -run TestSubQuery -count=1go test ./pkg/sql/plan -count=1makemake static-checkgit diff --checknpx markdownlint-cli CLAUDE_TODO_2026-05-22.mdmo-service; focused execution of the new BVT block returned expected rows.