-
-
Notifications
You must be signed in to change notification settings - Fork 873
Closed
Labels
bugSomething isn't workingSomething isn't workingsparksqlRelated to the SparkSQL (aka Spark3) dialectRelated to the SparkSQL (aka Spark3) dialect
Description
Search before asking
- I searched the issues and found no similar issues.
What Happened
I have this spark sql query
select /*+ repartition(200) */
one,
two
from
mytable
and starting from commit 18293ce sqlfluff is failing with
== [query.sql] FAIL
L: 1 | P: 23 | LT01 | Expected single whitespace between function name
| identifier and start bracket '('.
| [layout.spacing]
Expected Behaviour
I expect sqlfluff to ignore spacing in the query comments. Or there should be an option to disable this behavior
Observed Behaviour
sqlfluff is failing with
== [query.sql] FAIL
L: 1 | P: 23 | LT01 | Expected single whitespace between function name
| identifier and start bracket '('.
| [layout.spacing]
How to reproduce
Create file query.sql
:
select /*+ repartition(200) */
one,
two
from
mytable
Then execute
git checkout 18293ce419e9605e978e47b7f3e83fd7543f4818
uv venv
uv pip install .
uv run sqlfluff lint --dialect sparksql ./query.sql
Dialect
sparksql
Version
version 3.1.1 didn't have the issue, version 3.2.0 is the first release that has the issue
I bisected the problem to commit 18293ce
Configuration
default
Are you willing to work on and submit a PR to address the issue?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingsparksqlRelated to the SparkSQL (aka Spark3) dialectRelated to the SparkSQL (aka Spark3) dialect