Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-28383

Implement SQL:2011 WHERE predicates for application-versioned tables (CONTAINS, OVERLAPS, etc.)

    XMLWordPrintable

    Details

      Description

      I would like to request the keywords found in section 2.2.3 of "Temporal features in SQL:2011", for DML/DQL of application-versioned tables, be implemented. These include: `CONTAINS`, `OVERLAPS`, `EQUALS`, `PRECEDES`, `SUCCEEDS`, `IMMEDIATELY PRECEDES`, and `IMMEDIATELY SUCCEEDS`.

      `CONTAINS` is the most critical, since it is extremely advantageous to be able to query rows that are active now (or at any given point). It is relatively easy to implement in DML (by checking start <= date and end > date), as are all the predicates, but implementing them in the backend would greatly simplify queries.

      Sample constructions:

      SELECT * from t
      WHERE my_period CONTAINS DATE '2011-01-02';
       
      SELECT * from t
      WHERE my_period OVERLAPS
          PERIOD (DATE '2010-01-01',
          DATE '2011-01-01');
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              tgross35 Trevor Gross
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.