Skip to content

Commit 908fac1

Browse files
authored
parser: comment out merge syntax errors in regression suite (#540)
1 parent 9553b4f commit 908fac1

File tree

3 files changed

+36
-97
lines changed

3 files changed

+36
-97
lines changed

crates/squawk_parser/tests/data/regression_suite/merge.sql

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ WHEN MATCHED THEN
4242
--
4343
-- Errors
4444
--
45-
MERGE INTO target t RANDOMWORD
46-
USING source AS s
47-
ON t.tid = s.sid
48-
WHEN MATCHED THEN
49-
UPDATE SET balance = 0;
45+
-- MERGE INTO target t RANDOMWORD
46+
-- USING source AS s
47+
-- ON t.tid = s.sid
48+
-- WHEN MATCHED THEN
49+
-- UPDATE SET balance = 0;
5050
-- MATCHED/INSERT error
5151
MERGE INTO target t
5252
USING source AS s
@@ -60,41 +60,41 @@ ON t.tid = s.sid
6060
WHEN NOT MATCHED BY SOURCE THEN
6161
INSERT DEFAULT VALUES;
6262
-- incorrectly specifying INTO target
63-
MERGE INTO target t
64-
USING source AS s
65-
ON t.tid = s.sid
66-
WHEN NOT MATCHED THEN
67-
INSERT INTO target DEFAULT VALUES;
63+
-- MERGE INTO target t
64+
-- USING source AS s
65+
-- ON t.tid = s.sid
66+
-- WHEN NOT MATCHED THEN
67+
-- INSERT INTO target DEFAULT VALUES;
6868
-- Multiple VALUES clause
69-
MERGE INTO target t
70-
USING source AS s
71-
ON t.tid = s.sid
72-
WHEN NOT MATCHED THEN
73-
INSERT VALUES (1,1), (2,2);
69+
-- MERGE INTO target t
70+
-- USING source AS s
71+
-- ON t.tid = s.sid
72+
-- WHEN NOT MATCHED THEN
73+
-- INSERT VALUES (1,1), (2,2);
7474
-- SELECT query for INSERT
75-
MERGE INTO target t
76-
USING source AS s
77-
ON t.tid = s.sid
78-
WHEN NOT MATCHED THEN
79-
INSERT SELECT (1, 1);
75+
-- MERGE INTO target t
76+
-- USING source AS s
77+
-- ON t.tid = s.sid
78+
-- WHEN NOT MATCHED THEN
79+
-- INSERT SELECT (1, 1);
8080
-- NOT MATCHED/UPDATE
81-
MERGE INTO target t
82-
USING source AS s
83-
ON t.tid = s.sid
84-
WHEN NOT MATCHED THEN
85-
UPDATE SET balance = 0;
81+
-- MERGE INTO target t
82+
-- USING source AS s
83+
-- ON t.tid = s.sid
84+
-- WHEN NOT MATCHED THEN
85+
-- UPDATE SET balance = 0;
8686
-- NOT MATCHED BY TARGET/UPDATE
87-
MERGE INTO target t
88-
USING source AS s
89-
ON t.tid = s.sid
90-
WHEN NOT MATCHED BY TARGET THEN
91-
UPDATE SET balance = 0;
87+
-- MERGE INTO target t
88+
-- USING source AS s
89+
-- ON t.tid = s.sid
90+
-- WHEN NOT MATCHED BY TARGET THEN
91+
-- UPDATE SET balance = 0;
9292
-- UPDATE tablename
93-
MERGE INTO target t
94-
USING source AS s
95-
ON t.tid = s.sid
96-
WHEN MATCHED THEN
97-
UPDATE target SET balance = 0;
93+
-- MERGE INTO target t
94+
-- USING source AS s
95+
-- ON t.tid = s.sid
96+
-- WHEN MATCHED THEN
97+
-- UPDATE target SET balance = 0;
9898
-- source and target names the same
9999
MERGE INTO target
100100
USING target

crates/squawk_parser/tests/snapshots/tests__regression_merge.snap

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,64 +2,4 @@
22
source: crates/squawk_parser/tests/tests.rs
33
input_file: crates/squawk_parser/tests/data/regression_suite/merge.sql
44
---
5-
ERROR@1199: expected USING_KW
6-
ERROR@1209: expected ON_KW
7-
ERROR@1210: expected an expression, found USING_KW
8-
ERROR@1215: expected an expression
9-
ERROR@1215: expected WHEN_KW
10-
ERROR@1215: expected MATCHED, or NOT MATCHED
11-
ERROR@1215: expected THEN_KW
12-
ERROR@1215: expected INSERT, UPDATE, DELETE, or DO NOTHING
13-
ERROR@1215: expected SEMICOLON
14-
ERROR@1216: expected command, found SOURCE_KW
15-
ERROR@1223: expected command, found AS_KW
16-
ERROR@1226: expected command, found IDENT
17-
ERROR@1228: expected command, found ON_KW
18-
ERROR@1231: expected command, found IDENT
19-
ERROR@1232: expected command, found DOT
20-
ERROR@1233: expected command, found IDENT
21-
ERROR@1237: expected command, found EQ
22-
ERROR@1239: expected command, found IDENT
23-
ERROR@1240: expected command, found DOT
24-
ERROR@1241: expected command, found IDENT
25-
ERROR@1245: expected command, found WHEN_KW
26-
ERROR@1250: expected command, found MATCHED_KW
27-
ERROR@1258: expected command, found THEN_KW
28-
ERROR@1282: expected SET_KW
29-
ERROR@1282: expected name
30-
ERROR@1680: expected VALUES or DEFAULT VALUES
31-
ERROR@1680: expected SEMICOLON
32-
ERROR@1681: expected command, found INTO_KW
33-
ERROR@1686: expected command, found TARGET_KW
34-
ERROR@1693: expected command, found DEFAULT_KW
35-
ERROR@1707: expected L_PAREN
36-
ERROR@1735: expected L_PAREN
37-
ERROR@1741: expected L_PAREN
38-
ERROR@1746: expected L_PAREN
39-
ERROR@1753: expected L_PAREN
40-
ERROR@1755: expected L_PAREN
41-
ERROR@1761: expected L_PAREN
42-
ERROR@1768: expected L_PAREN
43-
ERROR@1771: expected L_PAREN
44-
ERROR@1773: expected L_PAREN
45-
ERROR@1776: expected L_PAREN
46-
ERROR@1777: expected L_PAREN
47-
ERROR@1778: expected L_PAREN
48-
ERROR@1782: expected L_PAREN
49-
ERROR@1784: expected L_PAREN
50-
ERROR@1785: expected L_PAREN
51-
ERROR@1786: expected L_PAREN
52-
ERROR@1790: expected L_PAREN
53-
ERROR@1795: expected L_PAREN
54-
ERROR@1799: expected L_PAREN
55-
ERROR@1807: expected L_PAREN
56-
ERROR@1813: expected L_PAREN
57-
ERROR@1820: expected L_PAREN
58-
ERROR@1952: expected VALUES or DEFAULT VALUES
59-
ERROR@1952: expected SEMICOLON
60-
ERROR@2336: expected SET_KW
61-
ERROR@2343: expected EQ
62-
ERROR@2347: expected SEMICOLON
63-
ERROR@2348: expected command, found IDENT
64-
ERROR@2356: expected command, found EQ
65-
ERROR@2358: expected command, found INT_NUMBER
5+

crates/squawk_parser/tests/snapshots/tests__regression_suite_errors.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
source: crates/squawk_parser/tests/tests.rs
33
expression: "out.join(\"\\n\")"
44
---
5-
tests/snapshots/tests__regression_merge.snap:61
65
tests/snapshots/tests__regression_strings.snap:49
76
tests/snapshots/tests__regression_xml.snap:382

0 commit comments

Comments
 (0)