sql-dialect-fmt-hover 1.18.0

LSP/editor-ready hover information for Snowflake SQL keywords, functions, types, procedures, and tasks.
Documentation
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
//! Spec-derived hover tables: Snowflake feature syntax and function signatures.
//!
//! @generated by `python3 scripts/generate-hover-tables.py` from
//! `spec/seed/features.json` and `spec/seed/functions.json`. Do not edit by
//! hand; edit the seed JSON and rerun the script (CI checks the sync).

/// One spec-tracker feature, hoverable via its keyword `phrases`.
pub(crate) struct FeatureDoc {
    /// Keyword sequences that trigger this hover, e.g. `&["GROUP", "BY"]`.
    pub(crate) phrases: &'static [&'static [&'static str]],
    pub(crate) name: &'static str,
    pub(crate) syntax: &'static str,
    /// Snowflake availability: `GA`, `Preview`, or `Deprecated`.
    pub(crate) status: &'static str,
    /// sql-dialect-fmt parser coverage: `parse`, `partial`, or `todo`.
    pub(crate) coverage: &'static str,
    pub(crate) notes: Option<&'static str>,
    pub(crate) docs_url: &'static str,
}

/// One spec-tracker function signature.
pub(crate) struct FunctionDoc {
    /// Uppercase name; qualified names keep their dots, e.g.
    /// `SNOWFLAKE.CORTEX.COMPLETE`.
    pub(crate) name: &'static str,
    pub(crate) category: &'static str,
    pub(crate) signature: &'static str,
    pub(crate) returns: &'static str,
    pub(crate) summary: &'static str,
    /// Snowflake availability: `GA`, `Preview`, or `Deprecated`.
    pub(crate) status: &'static str,
    /// Snowflake also accepts the function without parentheses.
    pub(crate) parenless: bool,
    pub(crate) docs_url: &'static str,
}

#[rustfmt::skip]
pub(crate) const FEATURES: &[FeatureDoc] = &[
    FeatureDoc {
        phrases: &[&["SELECT"]],
        name: "SELECT",
        syntax: "SELECT [DISTINCT|ALL] <items> ...",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference/sql/select",
    },
    FeatureDoc {
        phrases: &[&["TOP"]],
        name: "TOP",
        syntax: "SELECT TOP <n> ...",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["VALUES"]],
        name: "VALUES",
        syntax: "VALUES (..), (..)",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["FROM"]],
        name: "FROM",
        syntax: "FROM <table_ref> [, ...]",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["WHERE"]],
        name: "WHERE",
        syntax: "WHERE <expr>",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["GROUP", "BY"]],
        name: "GROUP BY",
        syntax: "GROUP BY <expr>[, ...] | ALL",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CUBE"], &["ROLLUP"], &["GROUPING", "SETS"]],
        name: "GROUP BY CUBE/ROLLUP/GROUPING SETS",
        syntax: "GROUP BY CUBE|ROLLUP|GROUPING SETS (...)",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["HAVING"]],
        name: "HAVING",
        syntax: "HAVING <expr>",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["QUALIFY"]],
        name: "QUALIFY",
        syntax: "QUALIFY <expr>",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["ORDER", "BY"]],
        name: "ORDER BY",
        syntax: "ORDER BY <expr> [ASC|DESC] [NULLS FIRST|LAST]",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["LIMIT"]],
        name: "LIMIT",
        syntax: "LIMIT <n>",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["OFFSET"]],
        name: "OFFSET",
        syntax: "OFFSET <n>",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["FETCH"]],
        name: "FETCH",
        syntax: "FETCH [FIRST|NEXT] <n> ROWS",
        status: "GA",
        coverage: "todo",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["WINDOW"]],
        name: "WINDOW",
        syntax: "WINDOW w AS (...)",
        status: "GA",
        coverage: "partial",
        notes: Some("inline OVER(...) is parsed; named WINDOW clause remains tracked separately"),
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["JOIN"], &["INNER", "JOIN"]],
        name: "INNER JOIN",
        syntax: "[INNER] JOIN t ON|USING",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["LEFT", "JOIN"], &["RIGHT", "JOIN"], &["FULL", "JOIN"], &["LEFT", "OUTER", "JOIN"], &["RIGHT", "OUTER", "JOIN"], &["FULL", "OUTER", "JOIN"]],
        name: "OUTER JOIN",
        syntax: "LEFT|RIGHT|FULL [OUTER] JOIN t ON|USING",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CROSS", "JOIN"]],
        name: "CROSS JOIN",
        syntax: "CROSS JOIN t",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["NATURAL", "JOIN"]],
        name: "NATURAL JOIN",
        syntax: "NATURAL [type] JOIN t",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["LATERAL"]],
        name: "LATERAL",
        syntax: "FROM t, LATERAL (...)",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["ASOF", "JOIN"]],
        name: "ASOF JOIN",
        syntax: "ASOF JOIN t MATCH_CONDITION (...)",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["UNION"]],
        name: "UNION",
        syntax: "q UNION [ALL] q",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["EXCEPT"]],
        name: "EXCEPT",
        syntax: "q EXCEPT q",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["INTERSECT"]],
        name: "INTERSECT",
        syntax: "q INTERSECT q",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["MINUS"]],
        name: "MINUS",
        syntax: "q MINUS q",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["WITH"]],
        name: "WITH",
        syntax: "WITH [RECURSIVE] name [(cols)] AS (q) [, ...]",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["EXISTS"]],
        name: "EXISTS",
        syntax: "[NOT] EXISTS (q)",
        status: "GA",
        coverage: "parse",
        notes: Some("EXISTS parsed; NOT EXISTS via prefix NOT"),
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["IS", "NULL"]],
        name: "IS NULL",
        syntax: "x IS [NOT] NULL",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["IN"]],
        name: "IN",
        syntax: "x [NOT] IN (list|q)",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["BETWEEN"]],
        name: "BETWEEN",
        syntax: "x [NOT] BETWEEN a AND b",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["LIKE"], &["ILIKE"]],
        name: "LIKE/ILIKE",
        syntax: "x [NOT] LIKE|ILIKE p",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["RLIKE"], &["REGEXP"]],
        name: "RLIKE/REGEXP",
        syntax: "x RLIKE|REGEXP p",
        status: "GA",
        coverage: "todo",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["IS", "DISTINCT", "FROM"]],
        name: "IS DISTINCT FROM",
        syntax: "x IS [NOT] DISTINCT FROM y",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["OVER"]],
        name: "OVER",
        syntax: "f(...) OVER (PARTITION BY .. ORDER BY .. <frame>)",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CAST"], &["TRY_CAST"]],
        name: "CAST/TRY_CAST",
        syntax: "CAST(x AS t) / TRY_CAST(x AS t)",
        status: "GA",
        coverage: "parse",
        notes: Some("both ::cast and CAST(..) function form parsed"),
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CASE"]],
        name: "CASE",
        syntax: "CASE [x] WHEN .. THEN .. ELSE .. END",
        status: "GA",
        coverage: "parse",
        notes: Some("searched + simple forms"),
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["PIVOT"], &["UNPIVOT"]],
        name: "PIVOT/UNPIVOT",
        syntax: "FROM t PIVOT(..) | UNPIVOT(..)",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["MATCH_RECOGNIZE"]],
        name: "MATCH_RECOGNIZE",
        syntax: "FROM t MATCH_RECOGNIZE (..)",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["SAMPLE"], &["TABLESAMPLE"]],
        name: "SAMPLE/TABLESAMPLE",
        syntax: "FROM t SAMPLE (n ROWS|PERCENT)",
        status: "GA",
        coverage: "parse",
        notes: Some("balanced body retained conservatively"),
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["FLATTEN"]],
        name: "FLATTEN",
        syntax: "TABLE(FLATTEN(input => ..))",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CONNECT", "BY"]],
        name: "CONNECT BY",
        syntax: "START WITH .. CONNECT BY ..",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["AT"], &["BEFORE"]],
        name: "AT/BEFORE",
        syntax: "FROM t AT(TIMESTAMP => ..) | BEFORE(STATEMENT => ..)",
        status: "GA",
        coverage: "parse",
        notes: Some("balanced body retained conservatively"),
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CHANGES"]],
        name: "CHANGES",
        syntax: "FROM t CHANGES(INFORMATION => ..)",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["INSERT"]],
        name: "INSERT",
        syntax: "INSERT INTO t [(cols)] VALUES|SELECT",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["INSERT", "ALL"], &["INSERT", "FIRST"]],
        name: "INSERT ALL/FIRST",
        syntax: "INSERT ALL|FIRST WHEN .. INTO ..",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["UPDATE"]],
        name: "UPDATE",
        syntax: "UPDATE t SET .. WHERE ..",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["DELETE"]],
        name: "DELETE",
        syntax: "DELETE FROM t WHERE ..",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["MERGE"]],
        name: "MERGE",
        syntax: "MERGE INTO t USING s ON .. WHEN MATCHED ..",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["COPY", "INTO"]],
        name: "COPY INTO",
        syntax: "COPY INTO t FROM @stage FILE_FORMAT=(..)",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CREATE", "TABLE"]],
        name: "CREATE TABLE",
        syntax: "CREATE [OR REPLACE] TABLE .. (cols) | AS SELECT | CLONE",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CREATE", "VIEW"]],
        name: "CREATE VIEW",
        syntax: "CREATE [OR REPLACE] [MATERIALIZED] VIEW .. AS q",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CREATE", "STREAM"]],
        name: "CREATE STREAM",
        syntax: "CREATE STREAM .. ON TABLE ..",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CREATE", "TASK"]],
        name: "CREATE TASK",
        syntax: "CREATE TASK .. SCHEDULE=.. AS ..",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CREATE", "DYNAMIC", "TABLE"]],
        name: "CREATE DYNAMIC TABLE",
        syntax: "CREATE DYNAMIC TABLE .. AS q",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CREATE", "SEMANTIC", "VIEW"]],
        name: "CREATE SEMANTIC VIEW",
        syntax: "CREATE SEMANTIC VIEW .. TABLES(..) RELATIONSHIPS(..) FACTS(..) DIMENSIONS(..) METRICS(..)",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CREATE", "STAGE"], &["CREATE", "FILE", "FORMAT"], &["CREATE", "SEQUENCE"]],
        name: "CREATE STAGE / FILE FORMAT / SEQUENCE",
        syntax: "CREATE STAGE|FILE FORMAT|SEQUENCE ..",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["CREATE", "FUNCTION"], &["CREATE", "PROCEDURE"]],
        name: "CREATE FUNCTION/PROCEDURE",
        syntax: "CREATE FUNCTION|PROCEDURE .. LANGUAGE .. AS $$..$$|'..'",
        status: "GA",
        coverage: "parse",
        notes: None,
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
    FeatureDoc {
        phrases: &[&["ALTER"], &["DROP"], &["UNDROP"], &["SHOW"], &["DESCRIBE"]],
        name: "ALTER/DROP/UNDROP/SHOW/DESCRIBE",
        syntax: "ALTER|DROP|UNDROP|SHOW|DESCRIBE ..",
        status: "GA",
        coverage: "partial",
        notes: Some("common forms parse; ALTER remains intentionally lenient"),
        docs_url: "https://docs.snowflake.com/en/sql-reference",
    },
];

#[rustfmt::skip]
pub(crate) const FUNCTIONS: &[FunctionDoc] = &[
    FunctionDoc {
        name: "COUNT",
        category: "aggregate",
        signature: "COUNT( [DISTINCT] <expr> | * )",
        returns: "NUMBER",
        summary: "Counts rows (*) or non-NULL values; also usable as a window function with OVER.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/count",
    },
    FunctionDoc {
        name: "COUNT_IF",
        category: "aggregate",
        signature: "COUNT_IF( <condition> )",
        returns: "NUMBER",
        summary: "Counts the rows where the boolean condition is TRUE.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/count_if",
    },
    FunctionDoc {
        name: "SUM",
        category: "aggregate",
        signature: "SUM( [DISTINCT] <expr> )",
        returns: "NUMBER | FLOAT",
        summary: "Adds the non-NULL input values; returns NULL for an empty or all-NULL group.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/sum",
    },
    FunctionDoc {
        name: "AVG",
        category: "aggregate",
        signature: "AVG( [DISTINCT] <expr> )",
        returns: "NUMBER | FLOAT",
        summary: "Arithmetic mean of the non-NULL input values.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/avg",
    },
    FunctionDoc {
        name: "MIN",
        category: "aggregate",
        signature: "MIN( <expr> )",
        returns: "same as input",
        summary: "Smallest non-NULL value in the group; NULLs are ignored.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/min",
    },
    FunctionDoc {
        name: "MAX",
        category: "aggregate",
        signature: "MAX( <expr> )",
        returns: "same as input",
        summary: "Largest non-NULL value in the group; NULLs are ignored.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/max",
    },
    FunctionDoc {
        name: "MEDIAN",
        category: "aggregate",
        signature: "MEDIAN( <expr> )",
        returns: "NUMBER | FLOAT",
        summary: "Median of the non-NULL values; interpolates between the two middle values.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/median",
    },
    FunctionDoc {
        name: "ANY_VALUE",
        category: "aggregate",
        signature: "ANY_VALUE( <expr> )",
        returns: "same as input",
        summary: "Returns an arbitrary value from the group; cheap way to carry a column through GROUP BY.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/any_value",
    },
    FunctionDoc {
        name: "LISTAGG",
        category: "aggregate",
        signature: "LISTAGG( [DISTINCT] <expr> [, <delimiter>] ) [ WITHIN GROUP ( ORDER BY ... ) ]",
        returns: "VARCHAR",
        summary: "Concatenates non-NULL values into one string, optionally ordered and delimited.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/listagg",
    },
    FunctionDoc {
        name: "ARRAY_AGG",
        category: "aggregate",
        signature: "ARRAY_AGG( [DISTINCT] <expr> ) [ WITHIN GROUP ( ORDER BY ... ) ]",
        returns: "ARRAY",
        summary: "Collects the non-NULL input values into an ARRAY, optionally ordered.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/array_agg",
    },
    FunctionDoc {
        name: "OBJECT_AGG",
        category: "aggregate",
        signature: "OBJECT_AGG( <key>, <value> )",
        returns: "OBJECT",
        summary: "Builds one OBJECT per group from key/value pairs; keys must be unique and non-NULL.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/object_agg",
    },
    FunctionDoc {
        name: "APPROX_COUNT_DISTINCT",
        category: "aggregate",
        signature: "APPROX_COUNT_DISTINCT( <expr> [, ...] )",
        returns: "NUMBER",
        summary: "HyperLogLog estimate of the number of distinct values (alias HLL); much cheaper than COUNT(DISTINCT ...).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/approx_count_distinct",
    },
    FunctionDoc {
        name: "PERCENTILE_CONT",
        category: "aggregate",
        signature: "PERCENTILE_CONT( <fraction> ) WITHIN GROUP ( ORDER BY <expr> )",
        returns: "FLOAT",
        summary: "Continuous percentile: interpolates the value at the given fraction of the ordered group.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/percentile_cont",
    },
    FunctionDoc {
        name: "STDDEV",
        category: "aggregate",
        signature: "STDDEV( [DISTINCT] <expr> )",
        returns: "FLOAT",
        summary: "Sample standard deviation (alias STDDEV_SAMP); use STDDEV_POP for the population form.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/stddev",
    },
    FunctionDoc {
        name: "ROW_NUMBER",
        category: "window",
        signature: "ROW_NUMBER() OVER ( [PARTITION BY ...] ORDER BY ... )",
        returns: "NUMBER",
        summary: "Unique 1-based row number within each partition in ORDER BY order.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/row_number",
    },
    FunctionDoc {
        name: "RANK",
        category: "window",
        signature: "RANK() OVER ( [PARTITION BY ...] ORDER BY ... )",
        returns: "NUMBER",
        summary: "Rank with gaps: ties share a rank and the next rank skips ahead.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/rank",
    },
    FunctionDoc {
        name: "DENSE_RANK",
        category: "window",
        signature: "DENSE_RANK() OVER ( [PARTITION BY ...] ORDER BY ... )",
        returns: "NUMBER",
        summary: "Rank without gaps: ties share a rank and the next distinct value gets the next rank.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/dense_rank",
    },
    FunctionDoc {
        name: "NTILE",
        category: "window",
        signature: "NTILE( <n> ) OVER ( [PARTITION BY ...] ORDER BY ... )",
        returns: "NUMBER",
        summary: "Splits each partition into <n> ordered buckets and returns the bucket number.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/ntile",
    },
    FunctionDoc {
        name: "LAG",
        category: "window",
        signature: "LAG( <expr> [, <offset> [, <default>]] ) OVER ( [PARTITION BY ...] ORDER BY ... )",
        returns: "same as input",
        summary: "Value from a preceding row in the partition; <default> replaces the out-of-window NULL.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/lag",
    },
    FunctionDoc {
        name: "LEAD",
        category: "window",
        signature: "LEAD( <expr> [, <offset> [, <default>]] ) OVER ( [PARTITION BY ...] ORDER BY ... )",
        returns: "same as input",
        summary: "Value from a following row in the partition; <default> replaces the out-of-window NULL.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/lead",
    },
    FunctionDoc {
        name: "FIRST_VALUE",
        category: "window",
        signature: "FIRST_VALUE( <expr> ) [ IGNORE NULLS ] OVER ( [PARTITION BY ...] ORDER BY ... )",
        returns: "same as input",
        summary: "First value of the ordered window frame; IGNORE NULLS skips leading NULLs.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/first_value",
    },
    FunctionDoc {
        name: "LAST_VALUE",
        category: "window",
        signature: "LAST_VALUE( <expr> ) [ IGNORE NULLS ] OVER ( [PARTITION BY ...] ORDER BY ... )",
        returns: "same as input",
        summary: "Last value of the ordered window frame; mind the default frame end of CURRENT ROW.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/last_value",
    },
    FunctionDoc {
        name: "RATIO_TO_REPORT",
        category: "window",
        signature: "RATIO_TO_REPORT( <expr> ) OVER ( [PARTITION BY ...] )",
        returns: "FLOAT",
        summary: "Each row's share of the partition total: value / SUM(value) OVER (...).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/ratio_to_report",
    },
    FunctionDoc {
        name: "CONCAT",
        category: "string",
        signature: "CONCAT( <expr1>, <expr2> [, ...] )",
        returns: "VARCHAR",
        summary: "Concatenates strings; equivalent to the || operator, and NULL if any input is NULL.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/concat",
    },
    FunctionDoc {
        name: "CONCAT_WS",
        category: "string",
        signature: "CONCAT_WS( <separator>, <expr1> [, ...] )",
        returns: "VARCHAR",
        summary: "Concatenates with a separator between the inputs; NULL if any input is NULL.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/concat_ws",
    },
    FunctionDoc {
        name: "SUBSTR",
        category: "string",
        signature: "SUBSTR( <string>, <start> [, <length>] )",
        returns: "VARCHAR",
        summary: "Substring from 1-based <start> (alias SUBSTRING); a negative start counts from the end.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/substr",
    },
    FunctionDoc {
        name: "SPLIT",
        category: "string",
        signature: "SPLIT( <string>, <separator> )",
        returns: "ARRAY",
        summary: "Splits a string on the literal separator into an ARRAY of strings.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/split",
    },
    FunctionDoc {
        name: "SPLIT_PART",
        category: "string",
        signature: "SPLIT_PART( <string>, <delimiter>, <part_number> )",
        returns: "VARCHAR",
        summary: "Returns the 1-based Nth piece after splitting; a negative index counts from the end.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/split_part",
    },
    FunctionDoc {
        name: "TRIM",
        category: "string",
        signature: "TRIM( <expr> [, <characters>] )",
        returns: "VARCHAR",
        summary: "Removes leading and trailing whitespace, or any of the given characters.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/trim",
    },
    FunctionDoc {
        name: "LPAD",
        category: "string",
        signature: "LPAD( <base>, <length> [, <pad>] )",
        returns: "VARCHAR | BINARY",
        summary: "Pads (or truncates) the string on the left to <length> using <pad>, default blanks.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/lpad",
    },
    FunctionDoc {
        name: "RPAD",
        category: "string",
        signature: "RPAD( <base>, <length> [, <pad>] )",
        returns: "VARCHAR | BINARY",
        summary: "Pads (or truncates) the string on the right to <length> using <pad>, default blanks.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/rpad",
    },
    FunctionDoc {
        name: "UPPER",
        category: "string",
        signature: "UPPER( <expr> )",
        returns: "VARCHAR",
        summary: "Uppercases the string.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/upper",
    },
    FunctionDoc {
        name: "LOWER",
        category: "string",
        signature: "LOWER( <expr> )",
        returns: "VARCHAR",
        summary: "Lowercases the string.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/lower",
    },
    FunctionDoc {
        name: "INITCAP",
        category: "string",
        signature: "INITCAP( <expr> [, <delimiters>] )",
        returns: "VARCHAR",
        summary: "Capitalizes the first letter of each word; <delimiters> overrides the word separators.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/initcap",
    },
    FunctionDoc {
        name: "LENGTH",
        category: "string",
        signature: "LENGTH( <expr> )",
        returns: "NUMBER",
        summary: "Length in characters for strings (alias LEN); bytes for BINARY.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/length",
    },
    FunctionDoc {
        name: "REPLACE",
        category: "string",
        signature: "REPLACE( <subject>, <pattern> [, <replacement>] )",
        returns: "VARCHAR",
        summary: "Replaces every occurrence of the literal pattern; omitting <replacement> deletes it.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/replace",
    },
    FunctionDoc {
        name: "POSITION",
        category: "string",
        signature: "POSITION( <needle>, <haystack> [, <start>] ) | POSITION( <needle> IN <haystack> )",
        returns: "NUMBER",
        summary: "1-based position of the first occurrence, or 0 when not found (alias CHARINDEX with swapped args).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/position",
    },
    FunctionDoc {
        name: "STARTSWITH",
        category: "string",
        signature: "STARTSWITH( <string>, <prefix> )",
        returns: "BOOLEAN",
        summary: "TRUE when the string starts with the prefix (case-sensitive).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/startswith",
    },
    FunctionDoc {
        name: "ENDSWITH",
        category: "string",
        signature: "ENDSWITH( <string>, <suffix> )",
        returns: "BOOLEAN",
        summary: "TRUE when the string ends with the suffix (case-sensitive).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/endswith",
    },
    FunctionDoc {
        name: "CONTAINS",
        category: "string",
        signature: "CONTAINS( <haystack>, <needle> )",
        returns: "BOOLEAN",
        summary: "TRUE when the first argument contains the second (case-sensitive).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/contains",
    },
    FunctionDoc {
        name: "REGEXP_REPLACE",
        category: "string",
        signature: "REGEXP_REPLACE( <subject>, <pattern> [, <replacement>, <position>, <occurrence>, <parameters>] )",
        returns: "VARCHAR",
        summary: "Regex replace; the default empty <replacement> deletes matches, and backslashes must be doubled in string literals.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/regexp_replace",
    },
    FunctionDoc {
        name: "REGEXP_SUBSTR",
        category: "string",
        signature: "REGEXP_SUBSTR( <subject>, <pattern> [, <position>, <occurrence>, <parameters>, <group_num>] )",
        returns: "VARCHAR",
        summary: "Returns the matching substring (or capture group) for the Nth regex match, or NULL.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/regexp_substr",
    },
    FunctionDoc {
        name: "COALESCE",
        category: "conditional",
        signature: "COALESCE( <expr1>, <expr2> [, ...] )",
        returns: "first non-NULL argument",
        summary: "First non-NULL argument, evaluated left to right.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/coalesce",
    },
    FunctionDoc {
        name: "NULLIF",
        category: "conditional",
        signature: "NULLIF( <expr1>, <expr2> )",
        returns: "same as first input",
        summary: "NULL when both arguments are equal, otherwise the first argument.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/nullif",
    },
    FunctionDoc {
        name: "IFF",
        category: "conditional",
        signature: "IFF( <condition>, <true_result>, <false_result> )",
        returns: "result type",
        summary: "Single-branch if/then/else; NULL conditions fall through to <false_result>.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/iff",
    },
    FunctionDoc {
        name: "IFNULL",
        category: "conditional",
        signature: "IFNULL( <expr1>, <expr2> )",
        returns: "result type",
        summary: "Second argument when the first is NULL (alias NVL).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/ifnull",
    },
    FunctionDoc {
        name: "NVL",
        category: "conditional",
        signature: "NVL( <expr1>, <expr2> )",
        returns: "result type",
        summary: "Second argument when the first is NULL (alias of IFNULL).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/nvl",
    },
    FunctionDoc {
        name: "NVL2",
        category: "conditional",
        signature: "NVL2( <expr1>, <not_null_result>, <null_result> )",
        returns: "result type",
        summary: "Returns the second argument when the first is not NULL, otherwise the third.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/nvl2",
    },
    FunctionDoc {
        name: "ZEROIFNULL",
        category: "conditional",
        signature: "ZEROIFNULL( <expr> )",
        returns: "NUMBER",
        summary: "0 when the input is NULL, otherwise the input.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/zeroifnull",
    },
    FunctionDoc {
        name: "DECODE",
        category: "conditional",
        signature: "DECODE( <expr>, <search1>, <result1> [, <search2>, <result2>, ...] [, <default>] )",
        returns: "result type",
        summary: "Compares against each search value (NULL matches NULL) and returns the paired result.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/decode",
    },
    FunctionDoc {
        name: "GREATEST",
        category: "conditional",
        signature: "GREATEST( <expr1> [, ...] )",
        returns: "largest argument",
        summary: "Largest argument; NULL if any argument is NULL (see GREATEST_IGNORE_NULLS).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/greatest",
    },
    FunctionDoc {
        name: "LEAST",
        category: "conditional",
        signature: "LEAST( <expr1> [, ...] )",
        returns: "smallest argument",
        summary: "Smallest argument; NULL if any argument is NULL (see LEAST_IGNORE_NULLS).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/least",
    },
    FunctionDoc {
        name: "EQUAL_NULL",
        category: "conditional",
        signature: "EQUAL_NULL( <expr1>, <expr2> )",
        returns: "BOOLEAN",
        summary: "NULL-safe equality: TRUE when both are equal or both are NULL.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/equal_null",
    },
    FunctionDoc {
        name: "ABS",
        category: "numeric",
        signature: "ABS( <expr> )",
        returns: "same as input",
        summary: "Absolute value.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/abs",
    },
    FunctionDoc {
        name: "CEIL",
        category: "numeric",
        signature: "CEIL( <expr> [, <scale>] )",
        returns: "NUMBER | FLOAT",
        summary: "Rounds up (toward positive infinity) to the given scale, default 0 digits.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/ceil",
    },
    FunctionDoc {
        name: "FLOOR",
        category: "numeric",
        signature: "FLOOR( <expr> [, <scale>] )",
        returns: "NUMBER | FLOAT",
        summary: "Rounds down (toward negative infinity) to the given scale, default 0 digits.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/floor",
    },
    FunctionDoc {
        name: "ROUND",
        category: "numeric",
        signature: "ROUND( <expr> [, <scale>] [, <rounding_mode>] )",
        returns: "NUMBER | FLOAT",
        summary: "Rounds half away from zero by default; HALF_TO_EVEN is available as the rounding mode.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/round",
    },
    FunctionDoc {
        name: "TRUNC",
        category: "numeric",
        signature: "TRUNC( <expr> [, <scale>] ) | TRUNC( <date_or_time_expr>, <date_part> )",
        returns: "NUMBER | DATE/TIMESTAMP",
        summary: "Truncates toward zero at the given scale; the two-argument date form works like DATE_TRUNC.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/trunc",
    },
    FunctionDoc {
        name: "MOD",
        category: "numeric",
        signature: "MOD( <dividend>, <divisor> )",
        returns: "NUMBER",
        summary: "Remainder with the sign of the dividend; also available as the % operator.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/mod",
    },
    FunctionDoc {
        name: "POWER",
        category: "numeric",
        signature: "POWER( <base>, <exponent> )",
        returns: "FLOAT",
        summary: "Raises the base to the exponent (alias POW).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/power",
    },
    FunctionDoc {
        name: "SQRT",
        category: "numeric",
        signature: "SQRT( <expr> )",
        returns: "FLOAT",
        summary: "Square root; errors on negative input.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/sqrt",
    },
    FunctionDoc {
        name: "RANDOM",
        category: "numeric",
        signature: "RANDOM( [<seed>] )",
        returns: "NUMBER",
        summary: "Pseudo-random 64-bit integer per row; a seed makes the sequence repeatable within a query.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/random",
    },
    FunctionDoc {
        name: "UNIFORM",
        category: "numeric",
        signature: "UNIFORM( <min>, <max>, <gen> )",
        returns: "NUMBER | FLOAT",
        summary: "Uniformly distributed value in [min, max]; pass RANDOM() as the generator.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/uniform",
    },
    FunctionDoc {
        name: "CURRENT_DATE",
        category: "context",
        signature: "CURRENT_DATE[()]",
        returns: "DATE",
        summary: "Current date in the session time zone.",
        status: "GA",
        parenless: true,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/current_date",
    },
    FunctionDoc {
        name: "CURRENT_TIMESTAMP",
        category: "context",
        signature: "CURRENT_TIMESTAMP[( [<fract_sec_precision>] )]",
        returns: "TIMESTAMP_LTZ",
        summary: "Current timestamp in the session time zone.",
        status: "GA",
        parenless: true,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/current_timestamp",
    },
    FunctionDoc {
        name: "SYSDATE",
        category: "context",
        signature: "SYSDATE()",
        returns: "TIMESTAMP_NTZ",
        summary: "Current timestamp in UTC, independent of the session time zone.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/sysdate",
    },
    FunctionDoc {
        name: "CURRENT_USER",
        category: "context",
        signature: "CURRENT_USER[()]",
        returns: "VARCHAR",
        summary: "Name of the user who is running the session.",
        status: "GA",
        parenless: true,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/current_user",
    },
    FunctionDoc {
        name: "CURRENT_ROLE",
        category: "context",
        signature: "CURRENT_ROLE[()]",
        returns: "VARCHAR",
        summary: "Primary role active in the session, or NULL when only secondary roles are active.",
        status: "GA",
        parenless: true,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/current_role",
    },
    FunctionDoc {
        name: "CURRENT_WAREHOUSE",
        category: "context",
        signature: "CURRENT_WAREHOUSE()",
        returns: "VARCHAR",
        summary: "Name of the warehouse in use for the session.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/current_warehouse",
    },
    FunctionDoc {
        name: "CURRENT_DATABASE",
        category: "context",
        signature: "CURRENT_DATABASE()",
        returns: "VARCHAR",
        summary: "Database in use for the session, or NULL when none is selected.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/current_database",
    },
    FunctionDoc {
        name: "CURRENT_SCHEMA",
        category: "context",
        signature: "CURRENT_SCHEMA()",
        returns: "VARCHAR",
        summary: "Schema in use for the session, or NULL when none is selected.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/current_schema",
    },
    FunctionDoc {
        name: "DATEADD",
        category: "datetime",
        signature: "DATEADD( <date_or_time_part>, <value>, <date_or_time_expr> )",
        returns: "DATE | TIME | TIMESTAMP",
        summary: "Adds the signed value of the given part (day, month, hour, ...) to a date/time.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/dateadd",
    },
    FunctionDoc {
        name: "DATEDIFF",
        category: "datetime",
        signature: "DATEDIFF( <date_or_time_part>, <start>, <end> )",
        returns: "NUMBER",
        summary: "Counts part boundaries crossed between start and end (not elapsed time): end minus start.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/datediff",
    },
    FunctionDoc {
        name: "DATE_TRUNC",
        category: "datetime",
        signature: "DATE_TRUNC( <date_or_time_part>, <expr> )",
        returns: "same as input",
        summary: "Truncates a date/time down to the start of the given part (year, month, day, hour, ...).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/date_trunc",
    },
    FunctionDoc {
        name: "DATE_PART",
        category: "datetime",
        signature: "DATE_PART( <date_or_time_part>, <expr> )",
        returns: "NUMBER",
        summary: "Extracts the numeric value of the given part; EXTRACT(<part> FROM <expr>) is equivalent.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/date_part",
    },
    FunctionDoc {
        name: "EXTRACT",
        category: "datetime",
        signature: "EXTRACT( <date_or_time_part> FROM <expr> )",
        returns: "NUMBER",
        summary: "SQL-standard spelling of DATE_PART.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/extract",
    },
    FunctionDoc {
        name: "LAST_DAY",
        category: "datetime",
        signature: "LAST_DAY( <date_or_time_expr> [, <date_part>] )",
        returns: "DATE",
        summary: "Last day of the month (default) or of the given part, e.g. year or quarter.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/last_day",
    },
    FunctionDoc {
        name: "CONVERT_TIMEZONE",
        category: "datetime",
        signature: "CONVERT_TIMEZONE( [<source_tz>,] <target_tz>, <timestamp> )",
        returns: "TIMESTAMP_NTZ | TIMESTAMP_TZ",
        summary: "Converts between IANA time zones; the two-argument form treats the input as TIMESTAMP_LTZ.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/convert_timezone",
    },
    FunctionDoc {
        name: "TO_VARCHAR",
        category: "conversion",
        signature: "TO_VARCHAR( <expr> [, <format>] )",
        returns: "VARCHAR",
        summary: "Converts to text, optionally with a number or date/time format model (alias TO_CHAR).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/to_varchar",
    },
    FunctionDoc {
        name: "TO_NUMBER",
        category: "conversion",
        signature: "TO_NUMBER( <expr> [, <format>] [, <precision>, <scale>] )",
        returns: "NUMBER",
        summary: "Converts to a fixed-point number (alias TO_DECIMAL); errors on invalid input, see TRY_TO_NUMBER.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/to_number",
    },
    FunctionDoc {
        name: "TO_DATE",
        category: "conversion",
        signature: "TO_DATE( <expr> [, <format>] )",
        returns: "DATE",
        summary: "Converts strings, timestamps, or epoch numbers to DATE; errors on invalid input, see TRY_TO_DATE.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/to_date",
    },
    FunctionDoc {
        name: "TO_TIMESTAMP",
        category: "conversion",
        signature: "TO_TIMESTAMP( <expr> [, <format> | <scale>] )",
        returns: "TIMESTAMP_NTZ",
        summary: "Converts to a timestamp; _NTZ/_LTZ/_TZ variants pick the time zone flavor explicitly.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/to_timestamp",
    },
    FunctionDoc {
        name: "TRY_TO_NUMBER",
        category: "conversion",
        signature: "TRY_TO_NUMBER( <string> [, <format>] [, <precision>, <scale>] )",
        returns: "NUMBER",
        summary: "Like TO_NUMBER but returns NULL instead of erroring on unparsable input.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/try_to_number",
    },
    FunctionDoc {
        name: "TRY_TO_DATE",
        category: "conversion",
        signature: "TRY_TO_DATE( <string> [, <format>] )",
        returns: "DATE",
        summary: "Like TO_DATE but returns NULL instead of erroring on unparsable input.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/try_to_date",
    },
    FunctionDoc {
        name: "TRY_TO_TIMESTAMP",
        category: "conversion",
        signature: "TRY_TO_TIMESTAMP( <string> [, <format>] )",
        returns: "TIMESTAMP_NTZ",
        summary: "Like TO_TIMESTAMP but returns NULL instead of erroring on unparsable input.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/try_to_timestamp",
    },
    FunctionDoc {
        name: "TO_JSON",
        category: "conversion",
        signature: "TO_JSON( <variant_expr> )",
        returns: "VARCHAR",
        summary: "Serializes a VARIANT value to a JSON string; inverse of PARSE_JSON.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/to_json",
    },
    FunctionDoc {
        name: "PARSE_JSON",
        category: "conversion",
        signature: "PARSE_JSON( <string> )",
        returns: "VARIANT",
        summary: "Parses JSON text into a VARIANT; errors on invalid JSON, see TRY_PARSE_JSON.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/parse_json",
    },
    FunctionDoc {
        name: "TRY_PARSE_JSON",
        category: "conversion",
        signature: "TRY_PARSE_JSON( <string> )",
        returns: "VARIANT",
        summary: "Like PARSE_JSON but returns NULL instead of erroring on invalid JSON.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/try_parse_json",
    },
    FunctionDoc {
        name: "FLATTEN",
        category: "table",
        signature: "FLATTEN( [INPUT =>] <expr> [, PATH => <path>] [, OUTER => TRUE|FALSE] [, RECURSIVE => TRUE|FALSE] [, MODE => 'OBJECT'|'ARRAY'|'BOTH'] )",
        returns: "rows: SEQ, KEY, PATH, INDEX, VALUE, THIS",
        summary: "Table function that explodes an ARRAY/OBJECT into rows; use with LATERAL or TABLE(...).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/flatten",
    },
    FunctionDoc {
        name: "GENERATOR",
        category: "table",
        signature: "GENERATOR( ROWCOUNT => <n> [, TIMELIMIT => <seconds>] )",
        returns: "rows with no columns",
        summary: "Table function producing synthetic rows; pair with SEQ4()/RANDOM() inside TABLE(...).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/generator",
    },
    FunctionDoc {
        name: "SEQ4",
        category: "table",
        signature: "SEQ4( [0|1] )",
        returns: "NUMBER",
        summary: "Sequence of 4-byte integers for generated rowsets (also SEQ1/SEQ2/SEQ8); may contain gaps — use ROW_NUMBER for gap-free numbering.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/seq4",
    },
    FunctionDoc {
        name: "GET",
        category: "semistructured",
        signature: "GET( <object_or_array>, <key_or_index> )",
        returns: "VARIANT",
        summary: "Element by object key or 0-based array index; NULL when absent. Bracket/colon syntax compiles to this.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/get",
    },
    FunctionDoc {
        name: "GET_PATH",
        category: "semistructured",
        signature: "GET_PATH( <variant>, <path_string> )",
        returns: "VARIANT",
        summary: "Extracts a nested element by path such as 'a.b[0].c'; the : path operator is shorthand for this.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/get_path",
    },
    FunctionDoc {
        name: "OBJECT_CONSTRUCT",
        category: "semistructured",
        signature: "OBJECT_CONSTRUCT( [<key1>, <value1> [, ...]] | * )",
        returns: "OBJECT",
        summary: "Builds an OBJECT from key/value pairs or all columns (*); pairs with NULL key or value are dropped (see OBJECT_CONSTRUCT_KEEP_NULL).",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/object_construct",
    },
    FunctionDoc {
        name: "OBJECT_KEYS",
        category: "semistructured",
        signature: "OBJECT_KEYS( <object> )",
        returns: "ARRAY",
        summary: "Top-level keys of an OBJECT (or object-typed VARIANT) as an array of strings.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/object_keys",
    },
    FunctionDoc {
        name: "ARRAY_CONSTRUCT",
        category: "semistructured",
        signature: "ARRAY_CONSTRUCT( [<expr> [, ...]] )",
        returns: "ARRAY",
        summary: "Builds an ARRAY from the arguments; [a, b, c] literal syntax is equivalent.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/array_construct",
    },
    FunctionDoc {
        name: "ARRAY_SIZE",
        category: "semistructured",
        signature: "ARRAY_SIZE( <array> )",
        returns: "NUMBER",
        summary: "Number of elements in an ARRAY (or array-typed VARIANT); NULL for non-arrays.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/array_size",
    },
    FunctionDoc {
        name: "ARRAY_CONTAINS",
        category: "semistructured",
        signature: "ARRAY_CONTAINS( <value>, <array> )",
        returns: "BOOLEAN",
        summary: "TRUE when the array contains the value; note the value comes first.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/array_contains",
    },
    FunctionDoc {
        name: "ARRAY_TO_STRING",
        category: "semistructured",
        signature: "ARRAY_TO_STRING( <array>, <separator> )",
        returns: "VARCHAR",
        summary: "Joins array elements into one string with the separator; NULL elements become empty strings.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/array_to_string",
    },
    FunctionDoc {
        name: "TYPEOF",
        category: "semistructured",
        signature: "TYPEOF( <variant_expr> )",
        returns: "VARCHAR",
        summary: "Type of the value stored in a VARIANT, e.g. 'VARCHAR', 'INTEGER', 'OBJECT', 'ARRAY', 'NULL_VALUE'.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/typeof",
    },
    FunctionDoc {
        name: "HASH",
        category: "misc",
        signature: "HASH( <expr> [, ...] )",
        returns: "NUMBER",
        summary: "Stable (non-cryptographic) 64-bit signed hash of the arguments; do not use for security.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/hash",
    },
    FunctionDoc {
        name: "MD5",
        category: "misc",
        signature: "MD5( <message> )",
        returns: "VARCHAR(32)",
        summary: "MD5 digest as 32 hex characters.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/md5",
    },
    FunctionDoc {
        name: "SHA2",
        category: "misc",
        signature: "SHA2( <message> [, <digest_size>] )",
        returns: "VARCHAR",
        summary: "SHA-2 digest as hex; digest size 224, 256 (default), 384, or 512.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/sha2",
    },
    FunctionDoc {
        name: "UUID_STRING",
        category: "misc",
        signature: "UUID_STRING( [<uuid_namespace>, <name>] )",
        returns: "VARCHAR",
        summary: "Random version-4 UUID, or a deterministic version-5 UUID from a namespace and name.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/uuid_string",
    },
    FunctionDoc {
        name: "SYSTEM$STREAM_HAS_DATA",
        category: "misc",
        signature: "SYSTEM$STREAM_HAS_DATA( '<stream_name>' )",
        returns: "BOOLEAN",
        summary: "TRUE when a stream has change records to consume; the usual guard in a task WHEN clause.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/system_stream_has_data",
    },
    FunctionDoc {
        name: "AI_COMPLETE",
        category: "ai",
        signature: "AI_COMPLETE( <model>, <prompt> [, <model_parameters>, <response_format>, <show_details>] )",
        returns: "VARCHAR | VARIANT",
        summary: "Generates an LLM completion for the prompt; the AISQL successor to SNOWFLAKE.CORTEX.COMPLETE.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/ai_complete",
    },
    FunctionDoc {
        name: "SNOWFLAKE.CORTEX.COMPLETE",
        category: "ai",
        signature: "SNOWFLAKE.CORTEX.COMPLETE( <model>, <prompt_or_history> [, <options>] )",
        returns: "VARCHAR | VARIANT",
        summary: "LLM completion with a chosen model; newer workloads should prefer AI_COMPLETE.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/complete-snowflake-cortex",
    },
    FunctionDoc {
        name: "SNOWFLAKE.CORTEX.SENTIMENT",
        category: "ai",
        signature: "SNOWFLAKE.CORTEX.SENTIMENT( <text> )",
        returns: "FLOAT",
        summary: "Sentiment score from -1 (negative) to 1 (positive) for English text.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/sentiment-snowflake-cortex",
    },
    FunctionDoc {
        name: "SNOWFLAKE.CORTEX.TRANSLATE",
        category: "ai",
        signature: "SNOWFLAKE.CORTEX.TRANSLATE( <text>, <source_language>, <target_language> )",
        returns: "VARCHAR",
        summary: "Translates text between supported languages; '' as source language enables auto-detection.",
        status: "GA",
        parenless: false,
        docs_url: "https://docs.snowflake.com/en/sql-reference/functions/translate-snowflake-cortex",
    },
];