We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I fear #2727 broke something. Take this example:
select key = value from table
With L012 set to explicit aliases, the result is invalid SQL:
select as key = value from table
Instead, I would expect
select value as key from table
or (preferably)
See above: Not broken code, either using as or = but not both ;)
as
=
sqlfluff currently adds an as, but also keeps the aliasing with =.
sqlfluff
See above: Use that snippet and call sqlfluff fix on it.
sqlfluff fix
T-SQL
Current master
master
[sqlfluff] dialect = tsql [sqlfluff:rules:L011] # Aliasing aliasing = implicit [sqlfluff:rules:L012] # Aliasing aliasing = explicit
The text was updated successfully, but these errors were encountered:
Yes I really think L012 is currently incompatible with this usage of aliasing. So think it needs to be turned off.
But concerning it corrupts SQL if people don't realise that. Would be good to update L012 to ignore this aliasing before 0.11.0 to avoid that issue.
Sorry, something went wrong.
I get linting errors with your examples. key, value and table are not valid sql.
key
value
table
Managed to fix it in #2750
Awesome, thank you!
Successfully merging a pull request may close this issue.
Search before asking
What Happened
I fear #2727 broke something.
Take this example:
With L012 set to explicit aliases, the result is invalid SQL:
Instead, I would expect
or (preferably)
Expected Behaviour
See above: Not broken code, either using
as
or=
but not both ;)Observed Behaviour
sqlfluff
currently adds anas
, but also keeps the aliasing with=
.How to reproduce
See above: Use that snippet and call
sqlfluff fix
on it.Dialect
T-SQL
Version
Current
master
Configuration
Are you willing to work on and submit a PR to address the issue?
Code of Conduct
The text was updated successfully, but these errors were encountered: