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

Implement MONTHS_BETWEEN aligned with Oracle one


    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2.0
    • Component/s: UDF
    • Labels:


      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.


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

          Issue Links



              • Assignee:
                apivovarov Alexander Pivovarov
                xiaobingo Xiaobing Zhou
              • Votes:
                0 Vote for this issue
                6 Start watching this issue


                • Created: