Open
Description
What Happened
playground
SELECT
name AS name1,
name2, -- my fav function
FAVORITE('%y%m%j', exit_date) AS quite_long_column_name,
-- my newest function NEWEST('%y%m%j', exit_date)
AS quite_long_column_name,
PARSE_DATE('%y%m%j', exit_date) AS quite_long_column_name
FROM users
locally with v0.19.0
SELECT
name AS name1,
name2, -- my fav function
FAVORITE('%y%m%j', exit_date) AS quite_long_column_name,
-- my newest function
NEWEST('%y%m%j', exit_date) AS quite_long_column_name,
PARSE_DATE('%y%m%j', exit_date) AS quite_long_column_name,
FROM USERS
Expected Behaviour
- Column order should not be changed (just because some columns use a function).
- Inline comments should keep their context.
- Long lines with a comment should not break the resulting SQL (only reproducible in playground).
How to reproduce
SELECT
name AS name1,
FAVORITE('%y%m%j', exit_date) AS quite_long_column_name, -- my fav function
NEWEST('%y%m%j', exit_date) AS quite_long_column_name, -- my newest function
PARSE_DATE('%y%m%j', exit_date) AS quite_long_column_name,
name2
from USERS
Configuration
[sqruff]
dialect = bigquery
rules = all