forked from sqlfluff/sqlfluff
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCV05.yml
More file actions
121 lines (107 loc) · 1.97 KB
/
Copy pathCV05.yml
File metadata and controls
121 lines (107 loc) · 1.97 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
rule: CV05
test_is_null:
pass_str: |
SELECT a
FROM foo
WHERE a IS NULL
test_is_not_null:
pass_str: |
SELECT a
FROM foo
WHERE a IS NOT NULL
test_not_equals_null_upper:
fail_str: |
SELECT a
FROM foo
WHERE a <> NULL
fix_str: |
SELECT a
FROM foo
WHERE a IS NOT NULL
test_not_equals_null_multi_nulls:
fail_str: |
SELECT a
FROM foo
WHERE a <> NULL AND b != NULL AND c = 'foo'
fix_str: |
SELECT a
FROM foo
WHERE a IS NOT NULL AND b IS NOT NULL AND c = 'foo'
test_not_equals_null_lower:
fail_str: |
SELECT a
FROM foo
WHERE a <> null
fix_str: |
SELECT a
FROM foo
WHERE a is not null
test_equals_null_spaces:
fail_str: |
SELECT a
FROM foo
WHERE a = NULL
fix_str: |
SELECT a
FROM foo
WHERE a IS NULL
test_equals_null_no_spaces:
fail_str: |
SELECT a
FROM foo
WHERE a=NULL
fix_str: |
SELECT a
FROM foo
WHERE a IS NULL
test_complex_case_1:
fail_str: |
SELECT a
FROM foo
WHERE a = b or (c > d or e = NULL)
fix_str: |
SELECT a
FROM foo
WHERE a = b or (c > d or e IS NULL)
test_set_clause:
pass_str: |
UPDATE table1 SET col = NULL
WHERE col = ""
test_bigquery_set_options:
pass_str: |
ALTER TABLE table
SET OPTIONS (expiration_timestamp = NULL)
;
configs:
core:
dialect: bigquery
test_tsql_exec_clause:
pass_str: |
exec something
@param1 = 'blah',
@param2 = 'blah',
@param3 = null,
@param4 = 'blah';
configs:
core:
dialect: tsql
test_tsql_alternate_alias_syntax:
pass_str: |
select
name = null
from t
configs:
core:
dialect: tsql
test_exclude_constraint:
pass_str: |
alter table abc add constraint xyz exclude (field WITH =);
configs:
core:
dialect: postgres
test_mysql_system_variable:
pass_str: |
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
configs:
core:
dialect: mysql