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

Fix: Make exp.Update a DML node #4223

Merged
merged 3 commits into from
Oct 8, 2024
Merged

Fix: Make exp.Update a DML node #4223

merged 3 commits into from
Oct 8, 2024

Conversation

VaggelisD
Copy link
Collaborator

Fixes #4221

This PR:

  • Makes exp.Update a DML node as is semantically fitting; This also enables traverse_scope on UPDATE statements
  • Fixes a bug with DML scope traversal, as the exp.Select children of subqueries would be visited twice (one in _traverse_subqueries and one in the find_all_in_scope(expression, exp.Query) block)

Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

Let's increase the testing coverage for this

@VaggelisD
Copy link
Collaborator Author

Do you have something specific in mind, e.g. should we check each scope individually for this particular case or introduce more UPDATE tests?

@georgesittas
Copy link
Collaborator

Do you have something specific in mind, e.g. should we check each scope individually for this particular case or introduce more UPDATE tests?

I was thinking some more UPDATE tests, use different clauses and see we're detecting the right scopes.

@VaggelisD VaggelisD merged commit dcdec95 into main Oct 8, 2024
6 checks passed
@VaggelisD VaggelisD deleted the vaggelisd/update_dml branch October 8, 2024 12:27
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.

Support traversing scope within UPDATE statements.
2 participants