[MDEV-9727] Window functions: datetime arithmetic for RANGE-type frames Created: 2016-03-14 Updated: 2021-10-14 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Optimizer - Window functions |
| Fix Version/s: | N/A |
| Type: | Task | Priority: | Major |
| Reporter: | Sergei Petrunia | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Unresolved | Votes: | 5 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Description |
|
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.
The building blocks for date+interval arithmetics are already there:
That is,
This task is to support interval arithmetics in window functions. |
| Comments |
| Comment by Zvi Landsman [ 2020-06-14 ] | ||||
|
resolving time to unix timestamp/seconds works:
|