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

L027 double raised with wildcard #1973

Closed
jpy-git opened this issue Nov 24, 2021 · 2 comments · Fixed by #1974
Closed

L027 double raised with wildcard #1973

jpy-git opened this issue Nov 24, 2021 · 2 comments · Fixed by #1974
Labels
bug Something isn't working

Comments

@jpy-git
Copy link
Contributor

jpy-git commented Nov 24, 2021

If you lint this query:

SELECT *
FROM foo
INNER JOIN bar;

L027 is raised twice.

N.B. this does not occur if * is replaced with a so it is specifically the wildcard causing the issue.

Expected Behaviour

L027 only raised once.

Observed Behaviour

image

Steps to Reproduce

lint the query shown above.

Dialect

Ansi

Version

Include the output of sqlfluff --version along with your Python version
0.8.2 (HEAD of main)

Configuration

using default config

@jpy-git jpy-git added the bug Something isn't working label Nov 24, 2021
@jpy-git
Copy link
Contributor Author

jpy-git commented Nov 24, 2021

Both of these recursive crawls in get_select_statement_info are returning the WildcardIdentifierSegment:

image

Perhaps the second crawl is unnecessary

@jpy-git
Copy link
Contributor Author

jpy-git commented Nov 24, 2021

Yep wildcard_identifier inherits from object_reference so I'll remove that second crawl

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant