substrait-extensions 0.88.1

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

# timestamps: examples using the precision_timestamp types
add('2016-12-31T13:30:15'::pts<6>, 'P5D'::iday<6>) = '2017-01-05T13:30:15'::pts<6>
add('2016-12-01T13:30:15'::pts<6>, 'P5Y'::iyear) = '2021-12-01T13:30:15'::pts<6>
add('2016-12-01T13:30:15'::pts<6>, 'PT5H'::iday<6>) = '2016-12-01T18:30:15'::pts<6>

# date_to_timestamp: examples using the date types and resulting in a timestamp
add('2020-12-31'::date, 'P5D'::iday<6>) = '2021-01-05T00:00:00'::pts<6>
add('2020-12-31'::date, 'P5Y'::iyear) = '2025-12-31'::date
add('2020-12-31'::date, 'P5M'::iyear) = '2021-05-31'::date

# null_input: examples with null args or return
add(null::date?, 'P5D'::iday<6>) = null::pts?<6>
add(null::date?, 'P5Y'::iyear) = null::date?