question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

L013 seems to expect an alias for the `*` when subsequent columns are present

See original GitHub issue

test.sql

select
    *,
    'string' as extra_column
from
    my_table
$ sqlfluff lint test.sql
== [test.sql] FAIL
L:   2 | P:   5 | L013 | Column expression without alias. Use explicit `AS`
                       | clause.

The linting passes if I don’t include extra_column in the select

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
alanmcruickshankcommented, Aug 7, 2020

This is definitely a bug, but I’m curious as to how it happens. I think it must be that there’s something fundamental about how the parse tree is structured in the two cases. This one needs more investigation.

Next step here is to run sqlfluff parse on each of the two queries and understand why select * from blah means that the * is not parsed as an expression, but select *, foo from blah means that * is parsed as an expression. 🤔

0reactions
pwildenhaincommented, Aug 13, 2020

Y’all are too quick on the draw! Would love to contribute in a future issue, thanks for addressing this so quickly 🏋️‍♂️

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sampling and Aliasing - NJIT
Problem 1: How many samples are enough to have to represent a continuous time signal?
Read more >
Aliasing - Wikipedia
In signal processing and related disciplines, aliasing is an effect that causes different signals to become indistinguishable when sampled.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found