-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix HAVING
rewriting made in #11306
#11515
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
frouioui
requested review from
harshit-gangal,
systay and
GuptaManan100
as code owners
October 17, 2022 13:16
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
frouioui
force-pushed
the
revert-11306
branch
from
October 17, 2022 13:17
89a027b
to
db46f7e
Compare
Signed-off-by: Andres Taylor <[email protected]>
Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Andres Taylor <[email protected]>
systay
changed the title
Revert
Fix Oct 17, 2022
HAVING
rewriting made in #11306HAVING
rewriting made in #11306
Signed-off-by: Florent Poinsard <[email protected]>
dbussink
approved these changes
Oct 17, 2022
systay
approved these changes
Oct 17, 2022
I was unable to backport this Pull Request to the following branches: |
Not backporting this as the original Pull Request (#11306) was not backported. |
frouioui
added a commit
to planetscale/vitess
that referenced
this pull request
Oct 18, 2022
* don't rewrite HAVING predicates that use table columns Signed-off-by: Andres Taylor <[email protected]> * Revert the changes made in vitessio#11306 Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Andres Taylor <[email protected]> * Fix early rewriter test Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Andres Taylor <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Andres Taylor <[email protected]>
frouioui
added a commit
that referenced
this pull request
Oct 20, 2022
* don't rewrite HAVING predicates that use table columns Signed-off-by: Andres Taylor <[email protected]> * Revert the changes made in #11306 Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Andres Taylor <[email protected]> * Fix early rewriter test Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Andres Taylor <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Andres Taylor <[email protected]> Signed-off-by: Andres Taylor <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Andres Taylor <[email protected]>
notfelineit
pushed a commit
to planetscale/vitess
that referenced
this pull request
Nov 16, 2022
…sio#1163) * don't rewrite HAVING predicates that use table columns Signed-off-by: Andres Taylor <[email protected]> * Revert the changes made in vitessio#11306 Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Andres Taylor <[email protected]> * Fix early rewriter test Signed-off-by: Florent Poinsard <[email protected]> Signed-off-by: Andres Taylor <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Andres Taylor <[email protected]> Signed-off-by: Andres Taylor <[email protected]> Signed-off-by: Florent Poinsard <[email protected]> Co-authored-by: Andres Taylor <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This Pull Request fixes a recent change introduced by #11306. An issue appeared several days ago as described in planetscale/discussion#308. We were rewriting the
having
expression to whatever was underneath the alias in the select list which is incorrect.We can only safely do this rewrite when the expression we want to filter by is not using any columns from the tables, so we should check that the predicate doesn't reference any columns that are out of scope.
Related Issue(s)
Checklist
Deployment Notes