Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Commit c8d4089

Browse files
committed
Update specs for v1.0.0-rc2 changes.
1 parent 0063445 commit c8d4089

File tree

135 files changed

+259727
-278624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+259727
-278624
lines changed

test/json/create-trigger/basic-create-trigger-2.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,12 @@
120120
"condition": [
121121
{
122122
"type": "condition",
123-
"condition": "if not exists"
123+
"variant": "if",
124+
"condition": {
125+
"type": "expression",
126+
"variant": "exists",
127+
"operator": "not exists"
128+
}
124129
}
125130
],
126131
"when": {

test/json/drop/basic-drop-trigger.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
"condition": [
1515
{
1616
"type": "condition",
17-
"condition": "if exists"
17+
"variant": "if",
18+
"condition": {
19+
"type": "expression",
20+
"variant": "exists",
21+
"operator": "exists"
22+
}
1823
}
1924
]
2025
}

test/json/drop/drop-table-alt-syntax.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414
"condition": [
1515
{
1616
"type": "condition",
17-
"condition": "if exists"
17+
"variant": "if",
18+
"condition": {
19+
"type": "expression",
20+
"variant": "exists",
21+
"operator": "exists"
22+
}
1823
}
1924
]
2025
}

test/json/expressions/binary-case.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
"result": [
99
{
1010
"type": "expression",
11-
"format": "binary",
1211
"variant": "case",
13-
"condition": [
12+
"expression": [
1413
{
1514
"type": "condition",
16-
"format": "when",
17-
"when": {
15+
"variant": "when",
16+
"condition": {
1817
"type": "expression",
1918
"format": "binary",
2019
"variant": "operation",
@@ -30,16 +29,16 @@
3029
"value": "red"
3130
}
3231
},
33-
"then": {
32+
"consequent": {
3433
"type": "literal",
3534
"variant": "text",
3635
"value": "ANGRY"
3736
}
3837
},
3938
{
4039
"type": "condition",
41-
"format": "when",
42-
"when": {
40+
"variant": "when",
41+
"condition": {
4342
"type": "expression",
4443
"format": "binary",
4544
"variant": "operation",
@@ -55,16 +54,16 @@
5554
"value": "green"
5655
}
5756
},
58-
"then": {
57+
"consequent": {
5958
"type": "literal",
6059
"variant": "text",
6160
"value": "HAPPY"
6261
}
6362
},
6463
{
6564
"type": "condition",
66-
"format": "else",
67-
"else": {
65+
"variant": "else",
66+
"consequent": {
6867
"type": "literal",
6968
"variant": "text",
7069
"value": "NEUTRAL"

test/json/expressions/expression-grouping-8.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,12 @@
192192
},
193193
{
194194
"type": "expression",
195-
"format": "binary",
196195
"variant": "case",
197-
"condition": [
196+
"expression": [
198197
{
199198
"type": "condition",
200-
"format": "when",
201-
"when": {
199+
"variant": "when",
200+
"condition": {
202201
"type": "expression",
203202
"format": "binary",
204203
"variant": "operation",
@@ -220,15 +219,14 @@
220219
"operator": "-"
221220
}
222221
},
223-
"then": {
222+
"consequent": {
224223
"type": "expression",
225-
"format": "binary",
226224
"variant": "case",
227-
"condition": [
225+
"expression": [
228226
{
229227
"type": "condition",
230-
"format": "when",
231-
"when": {
228+
"variant": "when",
229+
"condition": {
232230
"type": "expression",
233231
"format": "binary",
234232
"variant": "operation",
@@ -244,16 +242,16 @@
244242
"value": "2"
245243
}
246244
},
247-
"then": {
245+
"consequent": {
248246
"type": "literal",
249247
"variant": "decimal",
250248
"value": "1"
251249
}
252250
},
253251
{
254252
"type": "condition",
255-
"format": "else",
256-
"else": {
253+
"variant": "else",
254+
"consequent": {
257255
"type": "literal",
258256
"variant": "decimal",
259257
"value": "0"
@@ -264,8 +262,8 @@
264262
},
265263
{
266264
"type": "condition",
267-
"format": "else",
268-
"else": {
265+
"variant": "else",
266+
"consequent": {
269267
"type": "identifier",
270268
"variant": "column",
271269
"name": "duck"

test/json/official-suite/aggnested-1.json

Lines changed: 60 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -749,13 +749,12 @@
749749
"expression": [
750750
{
751751
"type": "expression",
752-
"format": "binary",
753752
"variant": "case",
754-
"condition": [
753+
"expression": [
755754
{
756755
"type": "condition",
757-
"format": "when",
758-
"when": {
756+
"variant": "when",
757+
"condition": {
759758
"type": "expression",
760759
"format": "binary",
761760
"variant": "operation",
@@ -771,16 +770,16 @@
771770
"value": "1"
772771
}
773772
},
774-
"then": {
773+
"consequent": {
775774
"type": "literal",
776775
"variant": "text",
777776
"value": "A"
778777
}
779778
},
780779
{
781780
"type": "condition",
782-
"format": "else",
783-
"else": {
781+
"variant": "else",
782+
"consequent": {
784783
"type": "literal",
785784
"variant": "text",
786785
"value": "B"
@@ -1217,13 +1216,12 @@
12171216
"expression": [
12181217
{
12191218
"type": "expression",
1220-
"format": "binary",
12211219
"variant": "case",
1222-
"condition": [
1220+
"expression": [
12231221
{
12241222
"type": "condition",
1225-
"format": "when",
1226-
"when": {
1223+
"variant": "when",
1224+
"condition": {
12271225
"type": "expression",
12281226
"format": "binary",
12291227
"variant": "operation",
@@ -1239,16 +1237,16 @@
12391237
"name": "i.aaa_id"
12401238
}
12411239
},
1242-
"then": {
1240+
"consequent": {
12431241
"type": "literal",
12441242
"variant": "decimal",
12451243
"value": "1"
12461244
}
12471245
},
12481246
{
12491247
"type": "condition",
1250-
"format": "else",
1251-
"else": {
1248+
"variant": "else",
1249+
"consequent": {
12521250
"type": "literal",
12531251
"variant": "decimal",
12541252
"value": "0"
@@ -1418,7 +1416,12 @@
14181416
"condition": [
14191417
{
14201418
"type": "condition",
1421-
"condition": "if exists"
1419+
"variant": "if",
1420+
"condition": {
1421+
"type": "expression",
1422+
"variant": "exists",
1423+
"operator": "exists"
1424+
}
14221425
}
14231426
]
14241427
},
@@ -1434,7 +1437,12 @@
14341437
"condition": [
14351438
{
14361439
"type": "condition",
1437-
"condition": "if exists"
1440+
"variant": "if",
1441+
"condition": {
1442+
"type": "expression",
1443+
"variant": "exists",
1444+
"operator": "exists"
1445+
}
14381446
}
14391447
]
14401448
},
@@ -1710,7 +1718,12 @@
17101718
"condition": [
17111719
{
17121720
"type": "condition",
1713-
"condition": "if exists"
1721+
"variant": "if",
1722+
"condition": {
1723+
"type": "expression",
1724+
"variant": "exists",
1725+
"operator": "exists"
1726+
}
17141727
}
17151728
]
17161729
},
@@ -1726,7 +1739,12 @@
17261739
"condition": [
17271740
{
17281741
"type": "condition",
1729-
"condition": "if exists"
1742+
"variant": "if",
1743+
"condition": {
1744+
"type": "expression",
1745+
"variant": "exists",
1746+
"operator": "exists"
1747+
}
17301748
}
17311749
]
17321750
},
@@ -2098,7 +2116,12 @@
20982116
"condition": [
20992117
{
21002118
"type": "condition",
2101-
"condition": "if exists"
2119+
"variant": "if",
2120+
"condition": {
2121+
"type": "expression",
2122+
"variant": "exists",
2123+
"operator": "exists"
2124+
}
21022125
}
21032126
]
21042127
},
@@ -2114,7 +2137,12 @@
21142137
"condition": [
21152138
{
21162139
"type": "condition",
2117-
"condition": "if exists"
2140+
"variant": "if",
2141+
"condition": {
2142+
"type": "expression",
2143+
"variant": "exists",
2144+
"operator": "exists"
2145+
}
21182146
}
21192147
]
21202148
},
@@ -2321,7 +2349,12 @@
23212349
"condition": [
23222350
{
23232351
"type": "condition",
2324-
"condition": "if exists"
2352+
"variant": "if",
2353+
"condition": {
2354+
"type": "expression",
2355+
"variant": "exists",
2356+
"operator": "exists"
2357+
}
23252358
}
23262359
]
23272360
},
@@ -2337,7 +2370,12 @@
23372370
"condition": [
23382371
{
23392372
"type": "condition",
2340-
"condition": "if exists"
2373+
"variant": "if",
2374+
"condition": {
2375+
"type": "expression",
2376+
"variant": "exists",
2377+
"operator": "exists"
2378+
}
23412379
}
23422380
]
23432381
},

test/json/official-suite/analyze3-1.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3636,7 +3636,12 @@
36363636
"condition": [
36373637
{
36383638
"type": "condition",
3639-
"condition": "if exists"
3639+
"variant": "if",
3640+
"condition": {
3641+
"type": "expression",
3642+
"variant": "exists",
3643+
"operator": "exists"
3644+
}
36403645
}
36413646
]
36423647
},
@@ -3867,7 +3872,12 @@
38673872
"condition": [
38683873
{
38693874
"type": "condition",
3870-
"condition": "if exists"
3875+
"variant": "if",
3876+
"condition": {
3877+
"type": "expression",
3878+
"variant": "exists",
3879+
"operator": "exists"
3880+
}
38713881
}
38723882
]
38733883
},

0 commit comments

Comments
 (0)