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

Filter after left join #9531

Merged
merged 7 commits into from
Jan 20, 2022
Merged

Filter after left join #9531

merged 7 commits into from
Jan 20, 2022

Conversation

systay
Copy link
Collaborator

@systay systay commented Jan 19, 2022

Description

Adds planner support for handling filtering after doing an outer join, such as in the following query:

SELECT user.id 
FROM user 
  LEFT JOIN user_extra ON user.col = user_extra.col
WHERE user_extra.id IS NULL

Checklist

  • Tests were added or are not required
  • Documentation was added or is not required

@systay systay added Component: Query Serving release notes Type: Enhancement Logical improvement (somewhere between a bug and feature) labels Jan 19, 2022
@systay systay marked this pull request as ready for review January 19, 2022 09:08
@systay systay requested review from vmg, harshit-gangal, frouioui and GuptaManan100 and removed request for harshit-gangal and frouioui January 19, 2022 09:08
@systay systay changed the title Filter outerjoin Filter after left join Jan 19, 2022
@systay systay marked this pull request as draft January 19, 2022 09:34
vmg
vmg previously requested changes Jan 19, 2022
Copy link
Collaborator

@vmg vmg left a comment

Choose a reason for hiding this comment

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

Some suggestions for the IS implementation in the evalengine.

go/vt/vtgate/evalengine/is_expr.go Outdated Show resolved Hide resolved
go/vt/vtgate/evalengine/is_expr.go Outdated Show resolved Hide resolved
systay and others added 5 commits January 19, 2022 17:31
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
… create simple projection when needed

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
…ogicalplan outputcolumn now

Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@systay systay requested a review from vmg January 20, 2022 05:43
@systay systay marked this pull request as ready for review January 20, 2022 06:01
@systay systay dismissed vmg’s stale review January 20, 2022 06:02

We moved the IS expr to a different PR

Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@systay systay merged commit a36d314 into vitessio:main Jan 20, 2022
@systay systay deleted the filter-outerjoin branch January 20, 2022 08:39
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.

4 participants