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

L026: Add support for merge_statement #3654

Conversation

barrywhart
Copy link
Member

@barrywhart barrywhart commented Jul 22, 2022

Brief summary of the change made

Fixes #3632

Are there any other side effects of this change that we should be aware of?

Pull Request checklist

  • Please confirm you have completed any of the necessary steps below.

  • Included test cases to demonstrate any code changes, which may be one or more of the following:

    • .yml rule test cases in test/fixtures/rules/std_rule_cases.
    • .sql/.yml parser test cases in test/fixtures/dialects (note YML files can be auto generated with tox -e generate-fixture-yml).
    • Full autofix test cases in test/fixtures/linter/autofix.
    • Other.
  • Added appropriate documentation for the change.

  • Created GitHub issues for any relevant followup/future enhancements if appropriate.

@barrywhart barrywhart requested a review from tunetheweb July 22, 2022 22:39
"update_statement",
"values_clause",
Copy link
Member Author

Choose a reason for hiding this comment

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

I added merge_statement. The other "changes" were just me sorting the types for easier reading.

# SET is not a resevered word in all dialects (e.g. RedShift)
# So specifically exclude as an allowed implict alias to avoid parsing errors
# SET is not a reserved word in all dialects (e.g. RedShift)
# So specifically exclude as an allowed implicit alias to avoid parsing errors
Copy link
Member Author

Choose a reason for hiding this comment

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

Unrelated to the main PR: Fixed a couple of typos

@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #3654 (87eaddc) into main (db168f5) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main     #3654   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          176       176           
  Lines        13334     13334           
=========================================
  Hits         13334     13334           
Impacted Files Coverage Δ
src/sqlfluff/core/rules/analysis/select_crawler.py 100.00% <ø> (ø)
src/sqlfluff/dialects/dialect_ansi.py 100.00% <ø> (ø)
src/sqlfluff/rules/L026.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db168f5...87eaddc. Read the comment docs.

@tunetheweb tunetheweb changed the title L026: Add support for merge_statement L026: Add support for merge_statement Jul 23, 2022
@barrywhart barrywhart merged commit 9986aaf into sqlfluff:main Jul 23, 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.

L026 rule (TSQL) cannot find table alias from MERGE construction
2 participants