The standard specifies that RANGE-type frame bounds support date[time] arithmetics. That is, one can write queries like this:
MariaDB only supports numeric types there. The reason for the limitation is that interval is not a first-class datatype in MySQL codebase.
- Interval is not parsed to an Item object
- One cannot use addition/subtraction to add an interval to a date.
MDEV-9676uses Item_func_plus/Item_func_minus, which allow range bounds to use any numeric datatype. This doesn't include datetime, though.
The building blocks for date+interval arithmetics are already there:
- the parser is able to parse interval values.
- there is code to do addition/subtraction.
This task is to support interval arithmetics in window functions.