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

Issue: ADD Months function on timestamp datatype fields in hive

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.0, 4.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Issue:

      while using ADD_Months function on a timestamp datatype column the output omits the time part[HH:MM:SS] part from output.

      which should not be the case.

      query: EMAIL_FAILURE_DTMZ is of datatype timestamp in hive.

      hive> select CUSTOMER_ID,EMAIL_FAILURE_DTMZ,ADD_MONTHS (EMAIL_FAILURE_DTMZ , 1) from TABLE1 where CUSTOMER_ID=125674937;
      OK
      125674937   2015-12-09 12:25:53     2016-01-09

      hiver version :

      hive> !hive --version;
      Hive 1.2.1000.2.5.6.0-40

       

      can you please help if somehow I can get below as output:

       

      125674937   2015-12-09 12:25:53           2016-01-09 12:25:53

        Attachments

        1. HIVE-19370.03.patch
          19 kB
          Bharathkrishna Guruvayoor Murali
        2. HIVE-19370.02.patch
          14 kB
          Bharathkrishna Guruvayoor Murali
        3. HIVE-19370.01.patch
          8 kB
          Bharathkrishna Guruvayoor Murali

          Issue Links

            Activity

              People

              • Assignee:
                bharos92 Bharathkrishna Guruvayoor Murali
                Reporter:
                amitchauhan1203 Amit Chauhan
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: