Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gen4: Subquery dependencies update #8998

Merged
merged 5 commits into from
Oct 14, 2021
Merged

Conversation

systay
Copy link
Collaborator

@systay systay commented Oct 14, 2021

Description

The way our semantic analysis works was causing problems for the plan building. Two different problems are solved by this changeset:

  1. Rewriting away subqueries did not update the binding information, so even when a subquery was removed from the query, the binding information was not updated.
  2. Dependencies from inside the subquery were leaking out. A small example will help illustrate the problem:
select (select col from foo), baz from bar 

The col on the inside of the subquery has a dependency on foo. This was leaking out so that the subquery expression also had a dependency to foo, when it really shouldn't.

Related Issue(s)

#7280

@systay systay added Component: Query Serving release notes Type: Enhancement Logical improvement (somewhere between a bug and feature) labels Oct 14, 2021
@systay systay changed the title Subquery deps fix gen4: Subquery dependencies update Oct 14, 2021
@systay systay marked this pull request as ready for review October 14, 2021 09:42
Copy link
Member

@GuptaManan100 GuptaManan100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now! 🌀

@systay systay merged commit 180ccfb into vitessio:main Oct 14, 2021
@systay systay deleted the subquery-deps-fix branch October 14, 2021 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants