[MDEV-16976] Support for periods operations Created: 2018-08-14  Updated: 2023-11-30

Status: Stalled
Project: MariaDB Server
Component/s: Data types, Optimizer
Fix Version/s: None

Type: New Feature Priority: Major
Reporter: Nikita Malyavin Assignee: Nikita Malyavin
Resolution: Unresolved Votes: 2
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-28383 Implement SQL:2011 WHERE predicates f... Closed
Relates
relates to MDEV-16972 Application-time periods support (pha... Closed
relates to MDEV-18928 Application-time periods support (pha... Closed

 Description   

The spec should look like:

period_expr ::= <period> <op> <period>
period      ::= PERIOD(<datetime>, <datetime>) | <period_name>
period_name ::= <ident>|<table_name>.<ident>
op          ::= CONTAINS|OVERLAPS|EQUALS|PRECEDES|SUCCEEDS
                |IMMEDIATELY PRECEDES|IMMEDIATELY SUCCEEDS



 Comments   
Comment by Sergei Golubchik [ 2018-08-14 ]

this certainly makes sense as an feature, it's in the standard, and it's reasonably easy to do. But I'm not sure it's a subtask of application-period tables, looks more like an independent feature to me.

Comment by Nikita Malyavin [ 2019-02-01 ]

to see also 4.14 Periods, 8.20 <period predicate>

Comment by Federico Razzoli [ 2020-02-14 ]

This comment could come too late to be even considered, but...
Wouldn't it be better to add range types, indexes and generic syntax to handle them, like PostgreSQL? (not necessarily compatible syntax, as pg syntax is a bit questionable)

https://www.postgresql.org/docs/12/rangetypes.html

Comment by Sergei Golubchik [ 2020-02-18 ]

yes, it would be better. Periods are just coming together with SQL standard temporal features — system-versioned and application time period tables. On itself, standalone, they aren't a particularly useful feature.

Generated at Thu Feb 08 08:32:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.