Details
-
Technical task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
-
None
Description
Currently INTERVAL literals can appear in context of the DATE_ADD function and the operator +.
For example:
SELECT DATE_ADD(OrderDate,INTERVAL 30 DAY) AS OrderPayDate FROM Orders |
SELECT OrderDate + INTERVAL 30 DAY AS OrderParDate FROM Orders; |
SELECT INTERVAL 30 DAY + OrderDate AS OrderParDate FROM Orders; |
We will change INTERVAL from a DATE_ADD and + specific syntax to a full-functional data type, so intervals can appear in all context where a regular data type can, including:
- INTERVAL table fields
- INTERVAL stored routine variables, parameters, function return values
- Hybrid built-in functions and operators, such as COALESCE, IF, CASE, LEAST, GREATEST.
- MIN and MAX aggregate functions
Attachments
Issue Links
- duplicates
-
MDEV-13088 SUGGESTION: New Data Type: Time Intervals
- Closed
-
MDEV-19144 sql_mode="oracle" does not support interval data type
- Closed
- is blocked by
-
MDEV-4912 Data type plugin API version 1
- Closed
-
MDEV-12514 Split Item_temporal_func::fix_length_and_dec()
- Closed
- is part of
-
MDEV-21086 New data types
- Open