-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpostgres.yaml
676 lines (676 loc) · 12.9 KB
/
postgres.yaml
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
name: postgres
type: sql
dependencies:
aggregate_approx:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_aggregate_approx.yaml
aggregate_generic:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_aggregate_generic.yaml
arithmetic:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_arithmetic.yaml
arithmetic_decimal:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_arithmetic_decimal.yaml
boolean:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_boolean.yaml
comparison:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_comparison.yaml
datetime:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_datetime.yaml
geometry:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_geometry.yaml
logarithmic:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_logarithmic.yaml
rounding:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_rounding.yaml
set:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_set.yaml
string:
https://github.com/substrait-io/substrait/blob/main/extensions/substrait/extensions/functions_string.yaml
supported_types:
i16:
sql_type_name: smallint
i32:
sql_type_name: integer
i64:
sql_type_name: bigint
fp32:
sql_type_name: float4
fp64:
sql_type_name: float8
bool:
sql_type_name: boolean
str:
sql_type_name: text
date:
sql_type_name: date
time:
sql_type_name: time
ts:
sql_type_name: timestamp
tstz:
sql_type_name: timestamptz
interval:
sql_type_name: interval
scalar_functions:
- name: arithmetic.add
local_name: +
infix: true
required_options:
overflow: ERROR
supported_kernels:
- i16_i16
- i32_i32
- i64_i64
- fp32_fp32
- fp64_fp64
- name: arithmetic.subtract
local_name: '-'
infix: true
required_options:
overflow: ERROR
rounding: TIE_TO_EVEN
supported_kernels:
- i16_i16
- i32_i32
- i64_i64
- name: arithmetic.multiply
local_name: '*'
infix: true
required_options:
overflow: ERROR
supported_kernels:
- i16_i16
- i32_i32
- i64_i64
- fp32_fp32
- fp64_fp64
- name: arithmetic.divide
local_name: /
infix: true
required_options:
on_division_by_zero: NAN
overflow: ERROR
rounding: TIE_TO_EVEN
on_domain_error: ERROR
supported_kernels:
- i16_i16
- i32_i32
- i64_i64
- fp64_fp64
- name: arithmetic.modulus
local_name: '%'
infix: true
required_options:
division_type: TRUNCATE
overflow: SILENT
on_domain_error: ERROR
supported_kernels:
- i16_i16
- i32_i32
- i64_i64
- name: arithmetic.power
local_name: pow
infix: false
required_options:
overflow: SILENT
supported_kernels:
- i64_i64
- fp32_fp32
- fp64_fp64
- name: arithmetic.sqrt
local_name: sqrt
required_options:
rounding: TIE_TO_EVEN
on_domain_error: ERROR
supported_kernels:
- i64
- fp32
- fp64
- name: arithmetic.exp
local_name: exp
required_options:
rounding: TIE_TO_EVEN
supported_kernels:
- i64
- fp32
- fp64
- name: arithmetic.cos
local_name: cos
infix: false
required_options:
rounding: TIE_TO_EVEN
supported_kernels:
- fp32
- fp64
- name: arithmetic.sin
local_name: sin
infix: false
required_options:
rounding: TIE_TO_EVEN
supported_kernels:
- fp32
- fp64
- name: arithmetic.tan
local_name: tan
infix: false
required_options:
rounding: TIE_TO_EVEN
supported_kernels:
- fp32
- fp64
- name: arithmetic.cosh
local_name: cosh
infix: false
required_options:
rounding: TIE_TO_EVEN
supported_kernels:
- fp32
- fp64
- name: arithmetic.sinh
local_name: sinh
infix: false
required_options:
rounding: TIE_TO_EVEN
supported_kernels:
- fp32
- fp64
- name: arithmetic.tanh
local_name: tanh
infix: false
required_options:
rounding: TIE_TO_EVEN
supported_kernels:
- fp32
- fp64
- name: arithmetic.acos
local_name: acos
infix: false
required_options:
rounding: TIE_TO_EVEN
on_domain_error: ERROR
supported_kernels:
- fp32
- fp64
- name: arithmetic.asin
local_name: asin
infix: false
required_options:
rounding: TIE_TO_EVEN
on_domain_error: ERROR
supported_kernels:
- fp32
- fp64
- name: arithmetic.atan
local_name: atan
infix: false
required_options:
rounding: TIE_TO_EVEN
supported_kernels:
- fp32
- fp64
- name: arithmetic.acosh
local_name: acosh
infix: false
required_options:
rounding: TIE_TO_EVEN
on_domain_error: ERROR
supported_kernels:
- fp32
- fp64
- name: arithmetic.asinh
local_name: asinh
infix: false
required_options:
rounding: TIE_TO_EVEN
supported_kernels:
- fp32
- fp64
- name: arithmetic.atanh
local_name: atanh
infix: false
required_options:
rounding: TIE_TO_EVEN
on_domain_error: NAN
supported_kernels:
- fp32
- fp64
- name: arithmetic.atan2
local_name: atan2
infix: false
required_options:
rounding: TIE_TO_EVEN
on_domain_error: NAN
supported_kernels:
- fp32_fp32
- fp64_fp64
- name: arithmetic.factorial
local_name: factorial
infix: false
required_options:
overflow: ERROR
supported_kernels:
- i32
- i64
- name: arithmetic.abs
local_name: abs
infix: false
required_options:
overflow: SILENT
supported_kernels:
- i16
- i32
- i64
- fp32
- fp64
- name: arithmetic.sign
local_name: sign
infix: false
supported_kernels:
- i8
- i16
- i32
- i64
- fp32
- fp64
- name: arithmetic.bitwise_not
local_name: '~'
supported_kernels:
- i16
- i32
- i64
- name: arithmetic.bitwise_and
local_name: '&'
infix: true
supported_kernels:
- i16_i16
- i32_i32
- i64_i64
- name: arithmetic.bitwise_or
local_name: '|'
infix: true
supported_kernels:
- i16_i16
- i32_i32
- i64_i64
- name: arithmetic.bitwise_xor
local_name: '#'
infix: true
supported_kernels:
- i16_i16
- i32_i32
- i64_i64
- name: boolean.and
local_name: and
infix: true
supported_kernels:
- bool
variadic: 0
- name: boolean.and_not
local_name: and NOT
infix: true
supported_kernels:
- bool_bool
- name: boolean.or
local_name: or
infix: true
supported_kernels:
- bool
variadic: 0
- name: boolean.xor
local_name: <>
infix: true
supported_kernels:
- bool_bool
- name: boolean.not
local_name: not
infix: false
supported_kernels:
- bool
- name: comparison.lt
local_name: <
infix: true
supported_kernels:
- any1_any1
- name: comparison.lte
local_name: <=
infix: true
supported_kernels:
- any1_any1
- name: comparison.gt
local_name: '>'
infix: true
supported_kernels:
- any1_any1
- name: comparison.gte
local_name: '>='
infix: true
supported_kernels:
- any1_any1
- name: comparison.equal
local_name: '='
infix: true
supported_kernels:
- any1_any1
- name: comparison.not_equal
local_name: '!='
infix: true
supported_kernels:
- any1_any1
- name: comparison.is_not_distinct_from
local_name: IS NOT DISTINCT FROM
infix: true
supported_kernels:
- any1_any1
- name: comparison.is_null
local_name: IS NULL
postfix: true
supported_kernels:
- any1
- name: comparison.is_not_null
local_name: IS NOT NULL
postfix: true
supported_kernels:
- any1
- name: comparison.nullif
local_name: NULLIF
infix: false
supported_kernels:
- any1_any1
- name: comparison.coalesce
supported_kernels:
- any1
variadic: 2
- name: comparison.between
between: true
supported_kernels:
- any1_any1_any1
- name: rounding.ceil
supported_kernels:
- fp32
- fp64
- name: rounding.floor
supported_kernels:
- fp32
- fp64
- name: rounding.round
supported_kernels:
- i16_i32
- i32_i32
- i64_i32
- name: datetime.extract
extract: true
supported_kernels:
- string_tstz_str
- string_ptstz_str
- string_tstz
- string_ts
- string_pts
- string_date
- string_time
- string_string_tstz_str
- string_string_ptstz_str
- string_string_ts
- string_string_pts
- string_string_date
- name: datetime.add
local_name: +
infix: true
supported_kernels:
- ts_interval
- tstz_interval_str
- date_interval
- ts_interval
- tstz_interval
- date_interval
- name: datetime.add_intervals
local_name: +
infix: true
required_options:
year_interval: 365
supported_kernels:
- interval_interval
- interval_interval
- name: datetime.subtract
local_name: '-'
infix: true
required_options:
with_time: true
supported_kernels:
- ts_interval
- tstz_interval
- tstz_interval_str
- date_interval
- ts_interval
- tstz_interval
- date_interval
- name: datetime.lt
local_name: <
infix: true
supported_kernels:
- ts_ts
- tstz_tstz
- date_date
- interval_interval
- interval_interval
- name: datetime.lte
local_name: <=
infix: true
supported_kernels:
- ts_ts
- tstz_tstz
- date_date
- interval_interval
- interval_interval
- name: datetime.gt
local_name: '>'
infix: true
supported_kernels:
- ts_ts
- tstz_tstz
- date_date
- interval_interval
- interval_interval
- name: datetime.gte
local_name: '>='
infix: true
supported_kernels:
- ts_ts
- tstz_tstz
- date_date
- interval_interval
- interval_interval
- name: string.substring
required_options:
negative_start: LEFT_OF_BEGINNING
supported_kernels:
- vchar_i32_i32
- str_i32_i32
- fchar_i32_i32
- vchar_i32
- str_i32
- fchar_i32
- name: string.concat
local_name: '||'
required_options:
null_handling: ACCEPT_NULLS
infix: true
supported_kernels:
- vchar
- str
variadic: 1
- name: string.concat_ws
supported_kernels:
- str_str
- vchar_vchar
variadic: 1
- name: string.like
infix: true
supported_kernels:
- vchar_vchar
- str_str
- name: string.lower
supported_kernels:
- str
- vchar
- fchar
- name: string.upper
supported_kernels:
- str
- vchar
- fchar
- name: string.reverse
supported_kernels:
- str
- vchar
- fchar
- name: string.replace
supported_kernels:
- str_str_str
- vchar_vchar_vchar
- name: string.regexp_replace
required_options:
lookaround: true
supported_kernels:
- str_str_str_i64_i64
- vchar_vchar_vchar_i64_i64
- str_str_str
- name: string.regexp_string_split
local_name: regexp_split_to_array
supported_kernels:
- vchar_vchar
- str_str
- name: string.regexp_count_substring
local_name: regexp_count
supported_kernels:
- str_str_i64
- vchar_vchar_i64
- fchar_fchar_i64
- str_str
- name: string.regexp_match_substring
local_name: regexp_substr
supported_kernels:
- vchar_vchar_i64_i64_i64
- str_str_i64_i64_i64
- str_str
- name: string.bit_length
supported_kernels:
- str
- vchar
- fchar
- name: string.char_length
supported_kernels:
- str
- vchar
- fchar
- name: string.octet_length
supported_kernels:
- str
- vchar
- fchar
- name: string.ltrim
supported_kernels:
- vchar_vchar
- str_str
- str
- name: string.rtrim
supported_kernels:
- vchar_vchar
- str_str
- str
- name: string.trim
supported_kernels:
- vchar_vchar
- str_str
- str
- name: string.lpad
supported_kernels:
- vchar_i32_vchar
- str_i32_str
- name: string.rpad
supported_kernels:
- vchar_i32_vchar
- str_i32_str
- name: string.left
supported_kernels:
- vchar_i32
- str_i32
- name: string.right
supported_kernels:
- vchar_i32
- str_i32
- name: string.starts_with
required_options:
case_sensitivity: CASE_SENSITIVE
supported_kernels:
- vchar_vchar
- vchar_str
- vchar_fchar
- str_str
- str_vchar
- str_fchar
- fchar_fchar
- fchar_str
- fchar_vchar
- name: logarithmic.ln
required_options:
on_log_zero: ERROR
on_domain_error: ERROR
supported_kernels:
- i64
- fp32
- fp64
- name: logarithmic.log10
required_options:
on_log_zero: ERROR
on_domain_error: ERROR
supported_kernels:
- i64
- fp32
- fp64
- name: logarithmic.logb
local_name: log
required_options:
on_log_zero: ERROR
on_domain_error: ERROR
supported_kernels:
- i64_i64
aggregate_functions:
- name: arithmetic.min
aggregate: true
supported_kernels:
- i16
- i32
- i64
- fp32
- fp64
- name: arithmetic.max
aggregate: true
supported_kernels:
- i16
- i32
- i64
- fp32
- fp64
- name: arithmetic.sum
aggregate: true
supported_kernels:
- i16
- i32
- fp32
- fp64
- name: aggregate_generic.count
aggregate: true
supported_kernels:
- any
- name: aggregate_generic.count_star
local_name: count(*)
aggregate: true
supported_kernels:
- ''
- name: boolean.bool_and
aggregate: true
supported_kernels:
- bool
- name: boolean.bool_or
aggregate: true
supported_kernels:
- bool