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

operator precedence must take associativity into consideration #6758

Merged
merged 2 commits into from
Sep 21, 2020

Conversation

systay
Copy link
Collaborator

@systay systay commented Sep 21, 2020

The Vitess AST printer was not taking associativity into consideration and stripping away parenthesis when it should not.

Fixes #6734

Signed-off-by: Andres Taylor <andres@planetscale.com>
Copy link
Contributor

@shlomi-noach shlomi-noach left a comment

Choose a reason for hiding this comment

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

I'm not familiar with the codebase and I can't make much sense of the actual logic change; just one request for an additional test case which we saw was handled incorrectly.

go/vt/sqlparser/precedence_test.go Show resolved Hide resolved
Signed-off-by: Andres Taylor <andres@planetscale.com>
@deepthi deepthi merged commit 40ee160 into vitessio:master Sep 21, 2020
systay added a commit that referenced this pull request Sep 22, 2020
Backport #6758 operator precedence must take associativity into consideration
systay added a commit that referenced this pull request Sep 23, 2020
Backport of #6758 operator precedence must take associativity into consideration
@askdba askdba added this to the v8.0 milestone Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Operator precedence issue
4 participants