Hive
  1. Hive
  2. HIVE-3850

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0, 0.10.0
    • Fix Version/s: 0.11.0
    • Component/s: UDF
    • Labels:
      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?

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

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Pieterjan Vriends
          • Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development