forked from substrait-io/substrait
-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions_datetime.yaml
879 lines (863 loc) · 28.4 KB
/
functions_datetime.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
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
%YAML 1.2
---
scalar_functions:
-
name: extract
description: >-
Extract portion of a date/time value.
* YEAR Return the year.
* ISO_YEAR Return the ISO 8601 week-numbering year. First week of an ISO year has the majority (4 or more) of
its days in January.
* US_YEAR Return the US epidemiological year. First week of US epidemiological year has the majority (4 or more)
of its days in January. Last week of US epidemiological year has the year's last Wednesday in it. US
epidemiological week starts on Sunday.
* QUARTER Return the number of the quarter within the year. January 1 through March 31 map to the first quarter,
April 1 through June 30 map to the second quarter, etc.
* MONTH Return the number of the month within the year.
* DAY Return the number of the day within the month.
* DAY_OF_YEAR Return the number of the day within the year. January 1 maps to the first day, February 1 maps to
the thirty-second day, etc.
* MONDAY_DAY_OF_WEEK Return the number of the day within the week, from Monday (first day) to Sunday (seventh
day).
* SUNDAY_DAY_OF_WEEK Return the number of the day within the week, from Sunday (first day) to Saturday (seventh
day).
* MONDAY_WEEK Return the number of the week within the year. First week starts on first Monday of January.
* SUNDAY_WEEK Return the number of the week within the year. First week starts on first Sunday of January.
* ISO_WEEK Return the number of the ISO week within the ISO year. First ISO week has the majority (4 or more)
of its days in January. ISO week starts on Monday.
* US_WEEK Return the number of the US week within the US year. First US week has the majority (4 or more) of
its days in January. US week starts on Sunday.
* HOUR Return the hour (0-23).
* MINUTE Return the minute (0-59).
* SECOND Return the second (0-59).
* MILLISECOND Return number of milliseconds since the last full second.
* MICROSECOND Return number of microseconds since the last full millisecond.
* NANOSECOND Return number of nanoseconds since the last full microsecond.
* SUBSECOND Return number of microseconds since the last full second of the given timestamp.
* UNIX_TIME Return number of seconds that have elapsed since 1970-01-01 00:00:00 UTC, ignoring leap seconds.
* TIMEZONE_OFFSET Return number of seconds of timezone offset to UTC.
The range of values returned for QUARTER, MONTH, DAY, DAY_OF_YEAR, MONDAY_DAY_OF_WEEK, SUNDAY_DAY_OF_WEEK,
MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK, and US_WEEK depends on whether counting starts at 1 or 0. This is governed
by the indexing option.
When indexing is ONE:
* QUARTER returns values in range 1-4
* MONTH returns values in range 1-12
* DAY returns values in range 1-31
* DAY_OF_YEAR returns values in range 1-366
* MONDAY_DAY_OF_WEEK and SUNDAY_DAY_OF_WEEK return values in range 1-7
* MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK, and US_WEEK return values in range 1-53
When indexing is ZERO:
* QUARTER returns values in range 0-3
* MONTH returns values in range 0-11
* DAY returns values in range 0-30
* DAY_OF_YEAR returns values in range 0-365
* MONDAY_DAY_OF_WEEK and SUNDAY_DAY_OF_WEEK return values in range 0-6
* MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK, and US_WEEK return values in range 0-52
The indexing option must be specified when the component is QUARTER, MONTH, DAY, DAY_OF_YEAR,
MONDAY_DAY_OF_WEEK, SUNDAY_DAY_OF_WEEK, MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK, or US_WEEK. The
indexing option cannot be specified when the component is YEAR, ISO_YEAR, US_YEAR, HOUR, MINUTE, SECOND,
MILLISECOND, MICROSECOND, SUBSECOND, UNIX_TIME, or TIMEZONE_OFFSET.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is invalid an error is thrown.
impls:
- args:
- name: component
options: [ YEAR, ISO_YEAR, US_YEAR, HOUR, MINUTE, SECOND,
MILLISECOND, MICROSECOND, SUBSECOND, UNIX_TIME, TIMEZONE_OFFSET ]
description: The part of the value to extract.
- name: x
value: timestamp_tz
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: i64
- args:
- name: component
options: [ YEAR, ISO_YEAR, US_YEAR, HOUR, MINUTE, SECOND,
MILLISECOND, MICROSECOND, NANOSECOND, SUBSECOND, UNIX_TIME, TIMEZONE_OFFSET ]
description: The part of the value to extract.
- name: x
value: precision_timestamp_tz<P1>
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: i64
- args:
- name: component
options: [ YEAR, ISO_YEAR, US_YEAR, HOUR, MINUTE, SECOND,
MILLISECOND, MICROSECOND, SUBSECOND, UNIX_TIME ]
description: The part of the value to extract.
- name: x
value: timestamp
return: i64
- args:
- name: component
options: [ YEAR, ISO_YEAR, US_YEAR, HOUR, MINUTE, SECOND,
MILLISECOND, MICROSECOND, NANOSECOND, SUBSECOND, UNIX_TIME ]
description: The part of the value to extract.
- name: x
value: precision_timestamp<P1>
return: i64
- args:
- name: component
options: [ YEAR, ISO_YEAR, US_YEAR, UNIX_TIME ]
description: The part of the value to extract.
- name: x
value: date
return: i64
- args:
- name: component
options: [ HOUR, MINUTE, SECOND, MILLISECOND, MICROSECOND, SUBSECOND ]
description: The part of the value to extract.
- name: x
value: time
return: i64
- args:
- name: component
options: [ QUARTER, MONTH, DAY, DAY_OF_YEAR, MONDAY_DAY_OF_WEEK,
SUNDAY_DAY_OF_WEEK, MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK, US_WEEK ]
description: The part of the value to extract.
- name: indexing
options: [ ONE, ZERO ]
description: Start counting from 1 or 0.
- name: x
value: timestamp_tz
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: i64
- args:
- name: component
options: [ QUARTER, MONTH, DAY, DAY_OF_YEAR, MONDAY_DAY_OF_WEEK,
SUNDAY_DAY_OF_WEEK, MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK, US_WEEK ]
description: The part of the value to extract.
- name: indexing
options: [ ONE, ZERO ]
description: Start counting from 1 or 0.
- name: x
value: precision_timestamp_tz<P1>
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: i64
- args:
- name: component
options: [ QUARTER, MONTH, DAY, DAY_OF_YEAR, MONDAY_DAY_OF_WEEK,
SUNDAY_DAY_OF_WEEK, MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK, US_WEEK ]
description: The part of the value to extract.
- name: indexing
options: [ ONE, ZERO ]
description: Start counting from 1 or 0.
- name: x
value: timestamp
return: i64
- args:
- name: component
options: [ QUARTER, MONTH, DAY, DAY_OF_YEAR, MONDAY_DAY_OF_WEEK,
SUNDAY_DAY_OF_WEEK, MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK, US_WEEK ]
description: The part of the value to extract.
- name: indexing
options: [ ONE, ZERO ]
description: Start counting from 1 or 0.
- name: x
value: precision_timestamp<P1>
return: i64
- args:
- name: component
options: [ QUARTER, MONTH, DAY, DAY_OF_YEAR, MONDAY_DAY_OF_WEEK,
SUNDAY_DAY_OF_WEEK, MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK, US_WEEK ]
description: The part of the value to extract.
- name: indexing
options: [ ONE, ZERO ]
description: Start counting from 1 or 0.
- name: x
value: date
return: i64
-
name: "extract_boolean"
description: >-
Extract boolean values of a date/time value.
* IS_LEAP_YEAR Return true if year of the given value is a leap year and false otherwise.
* IS_DST Return true if DST (Daylight Savings Time) is observed at the given value
in the given timezone.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is invalid an error is thrown.
impls:
- args:
- name: component
options: [ IS_LEAP_YEAR ]
description: The part of the value to extract.
- name: x
value: timestamp
return: boolean
- args:
- name: component
options: [ IS_LEAP_YEAR, IS_DST ]
description: The part of the value to extract.
- name: x
value: timestamp_tz
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: boolean
- args:
- name: component
options: [ IS_LEAP_YEAR ]
description: The part of the value to extract.
- name: x
value: date
return: boolean
-
name: "add"
description: >-
Add an interval to a date/time type.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is invalid an error is thrown.
impls:
- args:
- name: x
value: timestamp
- name: y
value: interval_year
return: timestamp
- args:
- name: x
value: timestamp_tz
- name: y
value: interval_year
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: timestamp_tz
- args:
- name: x
value: date
- name: y
value: interval_year
return: timestamp
- args:
- name: x
value: timestamp
- name: y
value: interval_day
return: timestamp
- args:
- name: x
value: timestamp_tz
- name: y
value: interval_day
return: timestamp_tz
- args:
- name: x
value: date
- name: y
value: interval_day
return: timestamp
-
name: "multiply"
description: Multiply an interval by an integral number.
impls:
- args:
- name: x
value: i8
- name: y
value: interval_day
return: interval_day
- args:
- name: x
value: i16
- name: y
value: interval_day
return: interval_day
- args:
- name: x
value: i32
- name: y
value: interval_day
return: interval_day
- args:
- name: x
value: i64
- name: y
value: interval_day
return: interval_day
- args:
- name: x
value: i8
- name: y
value: interval_year
return: interval_year
- args:
- name: x
value: i16
- name: y
value: interval_year
return: interval_year
- args:
- name: x
value: i32
- name: y
value: interval_year
return: interval_year
- args:
- name: x
value: i64
- name: y
value: interval_year
return: interval_year
-
name: "add_intervals"
description: Add two intervals together.
impls:
- args:
- name: x
value: interval_day
- name: y
value: interval_day
return: interval_day
- args:
- name: x
value: interval_year
- name: y
value: interval_year
return: interval_year
-
name: "subtract"
description: >-
Subtract an interval from a date/time type.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is invalid an error is thrown.
impls:
- args:
- name: x
value: timestamp
- name: y
value: interval_year
return: timestamp
- args:
- name: x
value: timestamp_tz
- name: y
value: interval_year
return: timestamp_tz
- args:
- name: x
value: timestamp_tz
- name: y
value: interval_year
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: timestamp_tz
- args:
- name: x
value: date
- name: y
value: interval_year
return: date
- args:
- name: x
value: timestamp
- name: y
value: interval_day
return: timestamp
- args:
- name: x
value: timestamp_tz
- name: y
value: interval_day
return: timestamp_tz
- args:
- name: x
value: date
- name: y
value: interval_day
return: date
-
name: "lte"
description: less than or equal to
impls:
- args:
- name: x
value: timestamp
- name: y
value: timestamp
return: boolean
- args:
- name: x
value: timestamp_tz
- name: y
value: timestamp_tz
return: boolean
- args:
- name: x
value: date
- name: y
value: date
return: boolean
- args:
- name: x
value: interval_day
- name: y
value: interval_day
return: boolean
- args:
- name: x
value: interval_year
- name: y
value: interval_year
return: boolean
-
name: "lt"
description: less than
impls:
- args:
- name: x
value: timestamp
- name: y
value: timestamp
return: boolean
- args:
- name: x
value: timestamp_tz
- name: y
value: timestamp_tz
return: boolean
- args:
- name: x
value: date
- name: y
value: date
return: boolean
- args:
- name: x
value: interval_day
- name: y
value: interval_day
return: boolean
- args:
- name: x
value: interval_year
- name: y
value: interval_year
return: boolean
-
name: "gte"
description: greater than or equal to
impls:
- args:
- name: x
value: timestamp
- name: y
value: timestamp
return: boolean
- args:
- name: x
value: timestamp_tz
- name: y
value: timestamp_tz
return: boolean
- args:
- name: x
value: date
- name: y
value: date
return: boolean
- args:
- name: x
value: interval_day
- name: y
value: interval_day
return: boolean
- args:
- name: x
value: interval_year
- name: y
value: interval_year
return: boolean
-
name: "gt"
description: greater than
impls:
- args:
- name: x
value: timestamp
- name: y
value: timestamp
return: boolean
- args:
- name: x
value: timestamp_tz
- name: y
value: timestamp_tz
return: boolean
- args:
- name: x
value: date
- name: y
value: date
return: boolean
- args:
- name: x
value: interval_day
- name: y
value: interval_day
return: boolean
- args:
- name: x
value: interval_year
- name: y
value: interval_year
return: boolean
-
name: "assume_timezone"
description: >-
Convert local timestamp to UTC-relative timestamp_tz using given local time's timezone.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is invalid an error is thrown.
impls:
- args:
- name: x
value: timestamp
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: timestamp_tz
- args:
- name: x
value: date
- name: timezone
description: Timezone string from IANA tzdb. Returned timestamp_tz will have time set to 00:00:00.
value: string
return: timestamp_tz
-
name: "local_timestamp"
description: >-
Convert UTC-relative timestamp_tz to local timestamp using given local time's timezone.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is invalid an error is thrown.
impls:
- args:
- name: x
value: timestamp_tz
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: timestamp
-
name: "strptime_time"
description: >-
Parse string into time using provided format,
see https://man7.org/linux/man-pages/man3/strptime.3.html for reference.
impls:
- args:
- name: time_string
value: string
- name: format
value: string
return: time
-
name: "strptime_date"
description: >-
Parse string into date using provided format,
see https://man7.org/linux/man-pages/man3/strptime.3.html for reference.
impls:
- args:
- name: date_string
value: string
- name: format
value: string
return: date
-
name: "strptime_timestamp"
description: >-
Parse string into timestamp using provided format,
see https://man7.org/linux/man-pages/man3/strptime.3.html for reference.
If timezone is present in timestamp and provided as parameter an error is thrown.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is supplied as parameter and present in the parsed string the parsed timezone is used.
If parameter supplied timezone is invalid an error is thrown.
impls:
- args:
- name: timestamp_string
value: string
- name: format
value: string
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: timestamp_tz
- args:
- name: timestamp_string
value: string
- name: format
value: string
return: timestamp_tz
-
name: "strftime"
description: >-
Convert timestamp/date/time to string using provided format,
see https://man7.org/linux/man-pages/man3/strftime.3.html for reference.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is invalid an error is thrown.
impls:
- args:
- name: x
value: timestamp
- name: format
value: string
return: string
- args:
- name: x
value: timestamp_tz
- name: format
value: string
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: string
- args:
- name: x
value: date
- name: format
value: string
return: string
- args:
- name: x
value: time
- name: format
value: string
return: string
-
name: "round_temporal"
description: >-
Round a given timestamp/date/time to a multiple of a time unit. If the given timestamp is not already an
exact multiple from the origin in the given timezone, the resulting point is chosen as one of the
two nearest multiples. Which of these is chosen is governed by rounding: FLOOR means to use the earlier
one, CEIL means to use the later one, ROUND_TIE_DOWN means to choose the nearest and tie to the
earlier one if equidistant, ROUND_TIE_UP means to choose the nearest and tie to the later one if
equidistant.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is invalid an error is thrown.
impls:
- args:
- name: x
value: timestamp
- name: rounding
options: [ FLOOR, CEIL, ROUND_TIE_DOWN, ROUND_TIE_UP ]
- name: unit
options: [ YEAR, MONTH, WEEK, DAY, HOUR, MINUTE, SECOND, MILLISECOND, MICROSECOND ]
- name: multiple
value: i64
- name: origin
value: timestamp
return: timestamp
- args:
- name: x
value: timestamp_tz
- name: rounding
options: [ FLOOR, CEIL, ROUND_TIE_DOWN, ROUND_TIE_UP ]
- name: unit
options: [ YEAR, MONTH, WEEK, DAY, HOUR, MINUTE, SECOND, MILLISECOND, MICROSECOND ]
- name: multiple
value: i64
- name: timezone
description: Timezone string from IANA tzdb.
value: string
- name: origin
value: timestamp_tz
return: timestamp_tz
- args:
- name: x
value: date
- name: rounding
options: [ FLOOR, CEIL, ROUND_TIE_DOWN, ROUND_TIE_UP ]
- name: unit
options: [ YEAR, MONTH, WEEK, DAY ]
- name: multiple
value: i64
- name: origin
value: date
return: date
- args:
- name: x
value: time
- name: rounding
options: [ FLOOR, CEIL, ROUND_TIE_DOWN, ROUND_TIE_UP ]
- name: unit
options: [ HOUR, MINUTE, SECOND, MILLISECOND, MICROSECOND ]
- name: multiple
value: i64
- name: origin
value: time
return: time
-
name: "round_calendar"
description: >-
Round a given timestamp/date/time to a multiple of a time unit. If the given timestamp is not already an
exact multiple from the last origin unit in the given timezone, the resulting point is chosen as one of the
two nearest multiples. Which of these is chosen is governed by rounding: FLOOR means to use the earlier
one, CEIL means to use the later one, ROUND_TIE_DOWN means to choose the nearest and tie to the
earlier one if equidistant, ROUND_TIE_UP means to choose the nearest and tie to the later one if
equidistant.
Timezone strings must be as defined by IANA timezone database (https://www.iana.org/time-zones).
Examples: "Pacific/Marquesas", "Etc/GMT+1".
If timezone is invalid an error is thrown.
impls:
- args:
- name: x
value: timestamp
- name: rounding
options: [ FLOOR, CEIL, ROUND_TIE_DOWN, ROUND_TIE_UP ]
- name: unit
options: [ YEAR, MONTH, WEEK, DAY, HOUR, MINUTE, SECOND, MILLISECOND, MICROSECOND ]
- name: origin
options: [ YEAR, MONTH, MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK,
US_WEEK, DAY, HOUR, MINUTE, SECOND, MILLISECOND ]
- name: multiple
value: i64
return: timestamp
- args:
- name: x
value: timestamp_tz
- name: rounding
options: [ FLOOR, CEIL, ROUND_TIE_DOWN, ROUND_TIE_UP ]
- name: unit
options: [ YEAR, MONTH, WEEK, DAY, HOUR, MINUTE, SECOND, MILLISECOND, MICROSECOND ]
- name: origin
options: [ YEAR, MONTH, MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK,
US_WEEK, DAY, HOUR, MINUTE, SECOND, MILLISECOND ]
- name: multiple
value: i64
- name: timezone
description: Timezone string from IANA tzdb.
value: string
return: timestamp_tz
- args:
- name: x
value: date
- name: rounding
options: [ FLOOR, CEIL, ROUND_TIE_DOWN, ROUND_TIE_UP ]
- name: unit
options: [ YEAR, MONTH, WEEK, DAY ]
- name: origin
options: [ YEAR, MONTH, MONDAY_WEEK, SUNDAY_WEEK, ISO_WEEK, US_WEEK, DAY ]
- name: multiple
value: i64
- name: origin
value: date
return: date
- args:
- name: x
value: time
- name: rounding
options: [ FLOOR, CEIL, ROUND_TIE_DOWN, ROUND_TIE_UP ]
- name: unit
options: [ DAY, HOUR, MINUTE, SECOND, MILLISECOND, MICROSECOND ]
- name: origin
options: [ DAY, HOUR, MINUTE, SECOND, MILLISECOND ]
- name: multiple
value: i64
- name: origin
value: time
return: time
aggregate_functions:
- name: "min"
description: Min a set of values.
impls:
- args:
- name: x
value: date
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: date?
return: date?
- args:
- name: x
value: time
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: time?
return: time?
- args:
- name: x
value: timestamp
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: timestamp?
return: timestamp?
- args:
- name: x
value: timestamp_tz
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: timestamp_tz?
return: timestamp_tz?
- args:
- name: x
value: interval_day
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: interval_day?
return: interval_day?
- args:
- name: x
value: interval_year
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: interval_year?
return: interval_year?
- name: "max"
description: Max a set of values.
impls:
- args:
- name: x
value: date
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: date?
return: date?
- args:
- name: x
value: time
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: time?
return: time?
- args:
- name: x
value: timestamp
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: timestamp?
return: timestamp?
- args:
- name: x
value: timestamp_tz
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: timestamp_tz?
return: timestamp_tz?
- args:
- name: x
value: interval_day
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: interval_day?
return: interval_day?
- args:
- name: x
value: interval_year
nullability: DECLARED_OUTPUT
decomposable: MANY
intermediate: interval_year?
return: interval_year?