Skip to content

allow_implicit_indents doesn't support QUALIFY #6325

@mroy-seedbox

Description

@mroy-seedbox

Search before asking

  • I searched the issues and found no similar issues.

What Happened

For the following query, LT02 is triggered as expected: Expected line break and indent of 2 spaces before '1'. sqlfluff(LT02: layout.indent)

SELECT 123
WHERE 1 = 1
  AND 2 = 2
QUALIFY 1 = 1
  AND 2 = 2;

But when setting allow_implicit_indents = True, the issue disappears for the WHERE, but remains for the QUALIFY:

image

Expected Behaviour

No issue is detected.

Observed Behaviour

An issue is detected.

How to reproduce

See above (plus the minimal configurations below).

Dialect

Snowflake (but should apply to any dialect).

Version

==== sqlfluff ====
sqlfluff:                3.2.2 python:                 3.10.7
implementation:        cpython verbosity:                   1
dialect:             snowflake templater:               jinja
rules:                                all

Configuration

[sqlfluff]
templater = jinja
dialect = snowflake

[sqlfluff:indentation]
tab_space_size = 2
allow_implicit_indents = True

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

I'm not sure where to start. I think this one might be beyond me.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions