XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0
    • Hive
    • Incompatible change, Reviewed
    • Hide
      HIVE-14412 adds 'timestamp with time zone' data type to Hive. The full qualified input format of this type is 'yyyy-MM-dd HH:mm:ss[.SSS...] ZoneId/ZoneOffset', where the time and zone parts are optional. If time part is absent, a default '00:00:00.0' will be used. If zone part is absent, the system time zone will be used. Examples of valid ZoneId and ZoneOffset are: America/Los_Angeles and GMT+08:00. All timestamp with time zone will be converted and stored as UTC retaining the instant. E.g. '2017-04-14 18:00:00 Asia/Shanghai' will be converted and stored as '2017-04-14 10:00:00.0 Z'.
      'timestamptz' is accepted as a type alias for 'timestamp with time zone'.
      Conversion between date/timestamp and timestamp with time zone is done using the system time zone.
      'time' becomes a reserved key word after HIVE-14412, thus can break user queries where 'time' is used as identifiers. If users want to continue use 'time' as identifiers, they have to escape it with '`' (backtick).
      Show
      HIVE-14412 adds 'timestamp with time zone' data type to Hive. The full qualified input format of this type is 'yyyy-MM-dd HH:mm:ss[.SSS...] ZoneId/ZoneOffset', where the time and zone parts are optional. If time part is absent, a default '00:00:00.0' will be used. If zone part is absent, the system time zone will be used. Examples of valid ZoneId and ZoneOffset are: America/Los_Angeles and GMT+08:00. All timestamp with time zone will be converted and stored as UTC retaining the instant. E.g. '2017-04-14 18:00:00 Asia/Shanghai' will be converted and stored as '2017-04-14 10:00:00.0 Z'. 'timestamptz' is accepted as a type alias for 'timestamp with time zone'. Conversion between date/timestamp and timestamp with time zone is done using the system time zone. 'time' becomes a reserved key word after HIVE-14412 , thus can break user queries where 'time' is used as identifiers. If users want to continue use 'time' as identifiers, they have to escape it with '`' (backtick).

    Description

      Java's Timestamp stores the time elapsed since the epoch. While it's by itself unambiguous, ambiguity comes when we parse a string into timestamp, or convert a timestamp to string, causing problems like HIVE-14305.
      To solve the issue, I think we should make timestamp aware of timezone.

      Attachments

        1. HIVE-14412.1.patch
          29 kB
          Rui Li
        2. HIVE-14412.10.patch
          223 kB
          Rui Li
        3. HIVE-14412.11.patch
          223 kB
          Rui Li
        4. HIVE-14412.12.patch
          229 kB
          Rui Li
        5. HIVE-14412.13.patch
          229 kB
          Rui Li
        6. HIVE-14412.2.patch
          192 kB
          Rui Li
        7. HIVE-14412.3.patch
          192 kB
          Rui Li
        8. HIVE-14412.4.patch
          200 kB
          Rui Li
        9. HIVE-14412.5.patch
          203 kB
          Rui Li
        10. HIVE-14412.6.patch
          243 kB
          Rui Li
        11. HIVE-14412.7.patch
          244 kB
          Rui Li
        12. HIVE-14412.8.patch
          253 kB
          Rui Li
        13. HIVE-14412.9.patch
          220 kB
          Rui Li

        Issue Links

          Activity

            People

              lirui Rui Li
              lirui Rui Li
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: