### 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<0>) = 2020-12-26T00:00:00::pts<0>
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<0>) = null::pts?<0>