Some basic datatypes and functions in oracle compatibility mode do not work
(MDEV-19162)
|
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Data types, Temporal Types |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Technical task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | Compatibility | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Description |
|
Currently INTERVAL literals can appear in context of the DATE_ADD function and the operator +.
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:
|
| Comments |
| Comment by Juan Telleria [ 2017-06-14 ] | |||||||
|
In R, there is a package called "lubridate" which also offers a "Time Interval" Class: I attach a vignette snapshot which contains some of the valuable functions this "Time Interval" Class offers. | |||||||
| Comment by Juan Telleria [ 2017-06-14 ] | |||||||
|
Interval Data Type could be really valuable for performing JOINs between tables by checking a temporal overlap between Events in a fast way. R lubridate package offers a function called int_overlaps() wich is valuable for performing in-memory joins between data frames. Also %within% function is of great interest. Thank you! | |||||||
| Comment by Juan Telleria [ 2017-06-15 ] | |||||||
|
What would be amazing would be to be able to do the following SQL query in few seconds, having "Column_Interval_Data_Type" indexed:
At the moment I have to take the following steps in order to perform similar queries in MariaDB:
Which also performs pretty fast, in a couple of minutes. Other option might be making use of Window Functions. Thank you. | |||||||
| Comment by Juan Telleria [ 2017-07-04 ] | |||||||
|
R Code for Intervals in "lubridate" package is as follows: |