forked from sqlfluff/sqlfluff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLT10.yml
62 lines (57 loc) · 1.14 KB
/
LT10.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
rule: LT10
test_fail_distinct_on_next_line_1:
fail_str: |
SELECT
DISTINCT user_id,
list_id
FROM
safe_user
fix_str: |
SELECT DISTINCT
user_id,
list_id
FROM
safe_user
test_fail_distinct_on_next_line_2:
fail_str: |
SELECT
-- The table contains duplicates, so we use DISTINCT.
DISTINCT user_id
FROM
safe_user
fix_str: |
SELECT DISTINCT
-- The table contains duplicates, so we use DISTINCT.
user_id
FROM
safe_user
test_fail_distinct_on_next_line_3:
fail_str: |
select
distinct
abc,
def
from a;
fix_str: |
select distinct
abc,
def
from a;
test_fail_distinct_on_next_line_4:
fail_str: |
CREATE OR REPLACE TABLE myschema.mytable AS (
SELECT
DISTINCT
cola
, colb
FROM myschema.mytable
);
fix_str: |
CREATE OR REPLACE TABLE myschema.mytable AS (
SELECT DISTINCT
cola
, colb
FROM myschema.mytable
);
test_pass_distinct_on_same_line_with_select:
pass_str: SELECT DISTINCT user_id FROM safe_user