@@ -8,16 +8,77 @@ import (
8
8
func defaultSchema (name string ) * catalog.Schema {
9
9
s := & catalog.Schema {Name : name }
10
10
s .Funcs = []* catalog.Function {
11
-
12
11
{
13
- Name : "ABS" ,
14
- Args : []* catalog.Argument {},
15
- ReturnType : & ast.TypeName {Name : "any" },
12
+ Name : "ABS" ,
13
+ Args : []* catalog.Argument {
14
+ {
15
+ Type : & ast.TypeName {Name : "tinyint" },
16
+ },
17
+ },
18
+ ReturnType : & ast.TypeName {Name : "tinyint" },
16
19
},
17
20
{
18
- Name : "ACOS" ,
19
- Args : []* catalog.Argument {},
20
- ReturnType : & ast.TypeName {Name : "any" },
21
+ Name : "ABS" ,
22
+ Args : []* catalog.Argument {
23
+ {
24
+ Type : & ast.TypeName {Name : "smallint" },
25
+ },
26
+ },
27
+ ReturnType : & ast.TypeName {Name : "smallint" },
28
+ },
29
+ {
30
+ Name : "ABS" ,
31
+ Args : []* catalog.Argument {
32
+ {
33
+ Type : & ast.TypeName {Name : "mediumint" },
34
+ },
35
+ },
36
+ ReturnType : & ast.TypeName {Name : "mediumint" },
37
+ },
38
+ {
39
+ Name : "ABS" ,
40
+ Args : []* catalog.Argument {
41
+ {
42
+ Type : & ast.TypeName {Name : "int" },
43
+ },
44
+ },
45
+ ReturnType : & ast.TypeName {Name : "int" },
46
+ },
47
+ {
48
+ Name : "ABS" ,
49
+ Args : []* catalog.Argument {
50
+ {
51
+ Type : & ast.TypeName {Name : "bigint" },
52
+ },
53
+ },
54
+ ReturnType : & ast.TypeName {Name : "bigint" },
55
+ },
56
+ {
57
+ Name : "ABS" ,
58
+ Args : []* catalog.Argument {
59
+ {
60
+ Type : & ast.TypeName {Name : "double" },
61
+ },
62
+ },
63
+ ReturnType : & ast.TypeName {Name : "double" },
64
+ },
65
+ {
66
+ Name : "ABS" ,
67
+ Args : []* catalog.Argument {
68
+ {
69
+ Type : & ast.TypeName {Name : "double precision" },
70
+ },
71
+ },
72
+ ReturnType : & ast.TypeName {Name : "double precision" },
73
+ },
74
+ {
75
+ Name : "ACOS" ,
76
+ Args : []* catalog.Argument {
77
+ {
78
+ Type : & ast.TypeName {Name : "double precision" },
79
+ },
80
+ },
81
+ ReturnType : & ast.TypeName {Name : "double precision" },
21
82
},
22
83
{
23
84
Name : "ADDDATE" ,
@@ -50,19 +111,31 @@ func defaultSchema(name string) *catalog.Schema {
50
111
ReturnType : & ast.TypeName {Name : "any" },
51
112
},
52
113
{
53
- Name : "ASIN" ,
54
- Args : []* catalog.Argument {},
55
- ReturnType : & ast.TypeName {Name : "any" },
114
+ Name : "ASIN" ,
115
+ Args : []* catalog.Argument {
116
+ {
117
+ Type : & ast.TypeName {Name : "double precision" },
118
+ },
119
+ },
120
+ ReturnType : & ast.TypeName {Name : "double precision" },
56
121
},
57
122
{
58
- Name : "ATAN" ,
59
- Args : []* catalog.Argument {},
60
- ReturnType : & ast.TypeName {Name : "any" },
123
+ Name : "ATAN" ,
124
+ Args : []* catalog.Argument {
125
+ {
126
+ Type : & ast.TypeName {Name : "double precision" },
127
+ },
128
+ },
129
+ ReturnType : & ast.TypeName {Name : "double precision" },
61
130
},
62
131
{
63
- Name : "ATAN2" ,
64
- Args : []* catalog.Argument {},
65
- ReturnType : & ast.TypeName {Name : "any" },
132
+ Name : "ATAN2" ,
133
+ Args : []* catalog.Argument {
134
+ {
135
+ Type : & ast.TypeName {Name : "double precision" },
136
+ },
137
+ },
138
+ ReturnType : & ast.TypeName {Name : "double precision" },
66
139
},
67
140
{
68
141
Name : "AVG" ,
@@ -115,14 +188,40 @@ func defaultSchema(name string) *catalog.Schema {
115
188
ReturnType : & ast.TypeName {Name : "any" },
116
189
},
117
190
{
118
- Name : "CEIL" ,
119
- Args : []* catalog.Argument {},
120
- ReturnType : & ast.TypeName {Name : "any" },
191
+ Name : "CEIL" ,
192
+ Args : []* catalog.Argument {
193
+ {
194
+ Type : & ast.TypeName {Name : "int" },
195
+ },
196
+ },
197
+ ReturnType : & ast.TypeName {Name : "int" },
121
198
},
122
199
{
123
- Name : "CEILING" ,
124
- Args : []* catalog.Argument {},
125
- ReturnType : & ast.TypeName {Name : "any" },
200
+ Name : "CEIL" ,
201
+ Args : []* catalog.Argument {
202
+ {
203
+ Type : & ast.TypeName {Name : "double precision" },
204
+ },
205
+ },
206
+ ReturnType : & ast.TypeName {Name : "double precision" },
207
+ },
208
+ {
209
+ Name : "CEILING" ,
210
+ Args : []* catalog.Argument {
211
+ {
212
+ Type : & ast.TypeName {Name : "int" },
213
+ },
214
+ },
215
+ ReturnType : & ast.TypeName {Name : "int" },
216
+ },
217
+ {
218
+ Name : "CEILING" ,
219
+ Args : []* catalog.Argument {
220
+ {
221
+ Type : & ast.TypeName {Name : "double precision" },
222
+ },
223
+ },
224
+ ReturnType : & ast.TypeName {Name : "double precision" },
126
225
},
127
226
{
128
227
Name : "CHAR" ,
@@ -180,9 +279,19 @@ func defaultSchema(name string) *catalog.Schema {
180
279
ReturnType : & ast.TypeName {Name : "any" },
181
280
},
182
281
{
183
- Name : "CONV" ,
184
- Args : []* catalog.Argument {},
185
- ReturnType : & ast.TypeName {Name : "any" },
282
+ Name : "CONV" ,
283
+ Args : []* catalog.Argument {
284
+ {
285
+ Type : & ast.TypeName {Name : "int" },
286
+ },
287
+ {
288
+ Type : & ast.TypeName {Name : "int" },
289
+ },
290
+ {
291
+ Type : & ast.TypeName {Name : "int" },
292
+ },
293
+ },
294
+ ReturnType : & ast.TypeName {Name : "text" },
186
295
},
187
296
{
188
297
Name : "CONVERT" ,
@@ -195,14 +304,22 @@ func defaultSchema(name string) *catalog.Schema {
195
304
ReturnType : & ast.TypeName {Name : "any" },
196
305
},
197
306
{
198
- Name : "COS" ,
199
- Args : []* catalog.Argument {},
200
- ReturnType : & ast.TypeName {Name : "any" },
307
+ Name : "COS" ,
308
+ Args : []* catalog.Argument {
309
+ {
310
+ Type : & ast.TypeName {Name : "double precision" },
311
+ },
312
+ },
313
+ ReturnType : & ast.TypeName {Name : "double precision" },
201
314
},
202
315
{
203
- Name : "COT" ,
204
- Args : []* catalog.Argument {},
205
- ReturnType : & ast.TypeName {Name : "any" },
316
+ Name : "COT" ,
317
+ Args : []* catalog.Argument {
318
+ {
319
+ Type : & ast.TypeName {Name : "double precision" },
320
+ },
321
+ },
322
+ ReturnType : & ast.TypeName {Name : "double precision" },
206
323
},
207
324
{
208
325
Name : "COUNT" ,
@@ -219,9 +336,13 @@ func defaultSchema(name string) *catalog.Schema {
219
336
ReturnType : & ast.TypeName {Name : "bigint" },
220
337
},
221
338
{
222
- Name : "CRC32" ,
223
- Args : []* catalog.Argument {},
224
- ReturnType : & ast.TypeName {Name : "any" },
339
+ Name : "CRC32" ,
340
+ Args : []* catalog.Argument {
341
+ {
342
+ Type : & ast.TypeName {Name : "text" },
343
+ },
344
+ },
345
+ ReturnType : & ast.TypeName {Name : "int" },
225
346
},
226
347
{
227
348
Name : "CUME_DIST" ,
@@ -344,9 +465,13 @@ func defaultSchema(name string) *catalog.Schema {
344
465
ReturnType : & ast.TypeName {Name : "any" },
345
466
},
346
467
{
347
- Name : "DEGREES" ,
348
- Args : []* catalog.Argument {},
349
- ReturnType : & ast.TypeName {Name : "any" },
468
+ Name : "DEGREES" ,
469
+ Args : []* catalog.Argument {
470
+ {
471
+ Type : & ast.TypeName {Name : "double precision" },
472
+ },
473
+ },
474
+ ReturnType : & ast.TypeName {Name : "int" },
350
475
},
351
476
{
352
477
Name : "DENSE_RANK" ,
0 commit comments