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

GenericUDF getTimestampValue should return Timestamp instead of Date

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0
    • UDF
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: