substrait-extensions 0.89.0

Packaged Substrait Extension Files
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
### SUBSTRAIT_SCALAR_TEST: v1.0
### SUBSTRAIT_INCLUDE: extension:io.substrait:functions_datetime

# timestamps: examples using the precision_timestamp type
subtract('2016-12-31T13:30:15'::pts<6>, 'P5D'::iday) = '2016-12-26T13:30:15'::pts<6>
subtract('2016-12-01T13:30:15'::pts<6>, 'P5Y'::iyear) = '2011-12-01T13:30:15'::pts<6>
subtract('2016-12-01T13:30:15'::pts<6>, 'PT5H'::iday) = '2016-12-01T08:30:15'::pts<6>

# date: examples using the date type
subtract('2020-12-31'::date, 'P5D'::iday) = '2020-12-26'::date
subtract('2020-12-31'::date, 'P5Y'::iyear) = '2015-12-31'::date
subtract('2020-12-31'::date, 'P5M'::iyear) = '2020-07-31'::date

# null_input: examples with null args or return
subtract(null::date?, 'P5D'::iday) = null::date?