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

hour() function returns 12 hour clock value when using timestamp datatype

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.0, 0.10.0
    • 0.11.0
    • UDF
    • None

    Description

      Apparently UDFHour.java does have two evaluate() functions. One that does accept a Text object as parameter and one that does use a TimeStampWritable object as parameter. The first function does return the value of Calendar.HOUR_OF_DAY and the second one of Calendar.HOUR. In the documentation I couldn't find any information on the overload of the evaluation function. I did spent quite some time finding out why my statement didn't return a 24 hour clock value.

      Shouldn't both functions return the same?

      Attachments

        1. HIVE-3850.patch.txt
          0.5 kB
          Frankline Jose S
        2. hive-3850_1.patch
          2 kB
          Anandha L Ranganathan

        Activity

          People

            Unassigned Unassigned
            pieterjan Pieterjan Vriends
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: