Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2754

Add INTERVAL type

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      We need support for an INTERVAL datatype. This is a pretty wide feature-gap for anyone doing temporal processing with Phoenix. For example, Oracle Interval Literals, Postgres Interval Type.

      In the mean time, arithmetic between DATE and TIME types with numeric values appears to work on units of days, so

      > select current_date(), current_date() - 7;
      +---------------------------------+---------------------------------+
      | DATE '2016-03-09 17:17:58.412'  | DATE '2016-03-02 17:17:58.412'  |
      +---------------------------------+---------------------------------+
      | 2016-03-09 17:17:58.412         | 2016-03-02 17:17:58.412         |
      +---------------------------------+---------------------------------+
      

      and

      > select current_date(), current_date() - (4.0/24);
      +---------------------------------+---------------------------------+
      | DATE '2016-03-09 17:18:19.221'  | DATE '2016-03-09 13:18:19.221'  |
      +---------------------------------+---------------------------------+
      | 2016-03-09 17:18:19.221         | 2016-03-09 13:18:19.221         |
      +---------------------------------+---------------------------------+
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ndimiduk Nick Dimiduk
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: