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

T-SQL: ALTER FUNCTION/PROCEDURE/VIEW parsing #3867

Merged
merged 2 commits into from Sep 24, 2022

Conversation

differgroup
Copy link
Contributor

Fixes the following T-SQL parsing error(s):
"Found unparsable section: 'ALTER FUNCTION...'
"Found unparsable section: 'ALTER PROCEDURE ...'
"Found unparsable section: 'ALTER VIEW ...'

The parsing for plain ALTER was missing.

The ALTER parsing is now implemented within the CreateFunctionStatementSegment(s),
as in T-SQL the syntax is otherwise similar.

Tests now also cover ALTER, as existing test cases have been modified to include all possible scenarios (CREATE, ALTER and CREATE OR ALTER).

@codecov
Copy link

codecov bot commented Sep 24, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (f3631d1) compared to base (4313db2).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #3867   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          179       179           
  Lines        13779     13779           
=========================================
  Hits         13779     13779           
Impacted Files Coverage Δ
src/sqlfluff/dialects/dialect_tsql.py 100.00% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@greg-finley
Copy link
Contributor

Thanks for the contribution!

@greg-finley greg-finley merged commit 59c6bce into sqlfluff:main Sep 24, 2022
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.

None yet

3 participants