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

GenericUDF getTimestampValue should return Timestamp instead of Date

    XMLWordPrintableJSON

    Details

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

      Description

      Currently getTimestampValue casts Timestamp to Date and returns Date.

      Hive Timestamp type stores time with nanosecond precision.
      Timestamp class has getNanos method to extract nanoseconds.
      Date class has getTime method which returns unix time in milliseconds.

      So, it order to be able to get nanoseconds from Timestamp fields GenericUDF.getTimestampValue should return Timestamp instead of Date.

        Attachments

        1. HIVE-10275.1.patch
          0.7 kB
          Alexander Pivovarov

          Activity

            People

            • Assignee:
              apivovarov Alexander Pivovarov
              Reporter:
              apivovarov Alexander Pivovarov
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: