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

feat: is_mutating method #30177

Merged
merged 2 commits into from
Sep 9, 2024
Merged

feat: is_mutating method #30177

merged 2 commits into from
Sep 9, 2024

Conversation

betodealmeida
Copy link
Member

@betodealmeida betodealmeida commented Sep 6, 2024

SUMMARY

Part of the work on SIP-117, this PR introduces a has_mutation() method to SQLScript, as well as a is_mutating() method to SQLStatement, in order to check if the SQL contains any DML.

This also fixes a bug where this SQL is flagged incorrectly as DML:

with source as (
  select 1 as one
)
select * from source

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TESTING INSTRUCTIONS

Added tests.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@michael-s-molina michael-s-molina added the review:checkpoint Last PR reviewed during the daily review standup label Sep 6, 2024
Copy link
Member

@mistercrunch mistercrunch left a comment

Choose a reason for hiding this comment

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

LGTM outside of the naming concern, pre-approving assuming the name change

@betodealmeida betodealmeida changed the title feat: is_dml method feat: is_mutating method Sep 9, 2024
@justinpark justinpark removed the review:checkpoint Last PR reviewed during the daily review standup label Sep 9, 2024
@betodealmeida betodealmeida merged commit 1f89071 into master Sep 9, 2024
34 checks passed
@sadpandajoe sadpandajoe added the v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch label Sep 11, 2024
sadpandajoe pushed a commit that referenced this pull request Sep 11, 2024
(cherry picked from commit 1f89071)
@rusackas rusackas deleted the is-dml branch September 27, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preset-io size/L v4.1 Label added by the release manager to track PRs to be included in the 4.1 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants