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

AST Equals code generator #7672

Merged
merged 13 commits into from
Mar 15, 2021
Merged

AST Equals code generator #7672

merged 13 commits into from
Mar 15, 2021

Conversation

harshit-gangal
Copy link
Member

@harshit-gangal harshit-gangal commented Mar 12, 2021

Generates deep equals comparisons for the AST.

Since we have a lot of pointers in our AST, the normal equality semantics of golang does not help us compare AST objects with each other. To enable the planner to plan more queries, we need to be able to simplify boolean operators (A OR A is equivalent to A). That all leads to this PR. We already have good tooling for generating AST helper code (both the rewriter and the deep clone for the AST are generated), so in this PR we implement deep equals for AST types.

Checklist

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

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving

harshit-gangal and others added 13 commits March 12, 2021 14:10
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
Signed-off-by: Andres Taylor <andres@planetscale.com>
@systay systay marked this pull request as ready for review March 13, 2021 07:08
@systay systay requested review from vmg and removed request for systay March 13, 2021 07:08
@systay systay merged commit 78b00c5 into vitessio:master Mar 15, 2021
@systay systay deleted the expr-equals branch March 15, 2021 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants