Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-9518

Implement MONTHS_BETWEEN aligned with Oracle one

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • UDF
    • None

    Description

      This is used to track work to build Oracle like months_between. Here's semantics:
      MONTHS_BETWEEN returns number of months between dates date1 and date2. If date1 is later than date2, then the result is positive. If date1 is earlier than date2, then the result is negative. If date1 and date2 are either the same days of the month or both last days of months, then the result is always an integer. Otherwise Oracle Database calculates the fractional portion of the result based on a 31-day month and considers the difference in time components date1 and date2.
      Should accept date, timestamp and string arguments in the format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss'.
      The result should be rounded to 8 decimal places.

      Attachments

        1. HIVE-9518.1.patch
          35 kB
          Xiaobing Zhou
        2. HIVE-9518.10.patch
          39 kB
          Alexander Pivovarov
        3. HIVE-9518.2.patch
          33 kB
          Xiaobing Zhou
        4. HIVE-9518.3.patch
          63 kB
          Xiaobing Zhou
        5. HIVE-9518.4.patch
          93 kB
          Xiaobing Zhou
        6. HIVE-9518.5.patch
          28 kB
          Alexander Pivovarov
        7. HIVE-9518.6.patch
          28 kB
          Alexander Pivovarov
        8. HIVE-9518.7.patch
          36 kB
          Alexander Pivovarov
        9. HIVE-9518.8.patch
          37 kB
          Alexander Pivovarov
        10. HIVE-9518.9.patch
          39 kB
          Alexander Pivovarov

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            apivovarov Alexander Pivovarov Assign to me
            xiaobingo Xiaobing Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment