Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-16334

date_diff_str function does not return expected results for 'month' part

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.1.0
    • 4.0.0
    • query
    • Security Level: Public
    • None
    • Untriaged
    • Unknown

    Description

      The function date_diff_str() returns null when the part is 'month':
      select date_diff_str('2015-12-22T20:02:48.407Z',clock_str(), 'month');
      "$1": null

      Other parts (e.g. 'hour') return correctly:
      select date_diff_str('2015-12-22T20:02:48.407Z',clock_str(), 'hour');
      "$1": 2168

      Date diff processing may need to have a case for 'month':
      https://github.com/couchbase/query/blob/master/expression/func_date.go#L1989
      Also 'quarter'

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            isha Isha Kandaswamy (Inactive)
            colm Colm Mchugh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty