Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5290

Add DATE_TRUNC function consistent with Postgres

    XMLWordPrintableJSON

Details

    • Bug
    • Status: In Progress
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Add DATE_TRUNC function consistent with Postgres. Per the specification, syntax is as follows:

      DATE_TRUNC(<string>, <timestamp | date | time>)
      

      It is a different (and more complex) specification than BigQuery's DATE_TRUNC (see CALCITE-5180), which has the following syntax:

      DATE_TRUNC(<date>, <interval>)
      

      Postgres DATE_TRUNC would be implemented after CALCITE-5155 and would allow user-defined time frames in the field argument.

      Attachments

        Issue Links

          Activity

            People

              MasseGuillaume Guillaume Massé
              julianhyde Julian Hyde
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: