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

Robust and extensible SQL precedence/parentheses mechanism #23895

Closed
roji opened this issue Jan 15, 2021 · 1 comment
Closed

Robust and extensible SQL precedence/parentheses mechanism #23895

roji opened this issue Jan 15, 2021 · 1 comment
Assignees
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@roji
Copy link
Member

roji commented Jan 15, 2021

At the moment our SQL generation isn't aware of the precedence of operators and other constructs; to avoid incorrect precedence, we just always place parentheses around SqlBinaryExpression and LikeExpression. We could have a more robust mechanism that identifies when parentheses are actually necessary based on precedence, including extensibility to provider-specific expression/operator types.

Note: since it's always possible to just always put parentheses around certain expression types (like we do now), this is basically a non-urgent SQL prettiness issue.

Originally raised in #3055

@smitpatel
Copy link
Member

Fixed by #26660

@smitpatel smitpatel self-assigned this Nov 19, 2021
@smitpatel smitpatel added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Nov 19, 2021
@smitpatel smitpatel modified the milestones: Backlog, 7.0.0 Nov 19, 2021
@ajcvickers ajcvickers modified the milestones: 7.0.0, 7.0.0-preview1 Feb 14, 2022
@ajcvickers ajcvickers modified the milestones: 7.0.0-preview1, 7.0.0 Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

3 participants