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

Support "set local time zone" statement

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: None
    • Labels:

      Description

      HIVE-14412 introduces a timezone-aware timestamp.

      SQL has a concept of default time zone displacements, which are transparently applied when converting between timezone-unaware types and timezone-aware types and, in Hive's case, are also used to shift a timezone aware type to a different time zone, depending on configuration.

      SQL also provides that the default time zone displacement be settable at a session level, so that clients can access a database simultaneously from different time zones and see time values in their own time zone.

      Currently the time zone displacement is fixed and is set based on the system time zone where the Hive client runs (HiveServer2 or Hive CLI). It will be more convenient for users if they have the ability to set their time zone of choice.

      SQL defines "set time zone" with 2 ways of specifying the time zone, first using an interval and second using the special keyword LOCAL.

      Examples:
      • set time zone '-8:00';
      • set time zone LOCAL;

      LOCAL means to set the current default time zone displacement to the session's original default time zone displacement.

      Reference: SQL:2011 section 19.4

        Attachments

        1. HIVE-16614.05.patch
          253 kB
          Jesus Camacho Rodriguez
        2. HIVE-16614.04.patch
          233 kB
          Jesus Camacho Rodriguez
        3. HIVE-16614.03.patch
          122 kB
          Jesus Camacho Rodriguez
        4. HIVE-16614.02.patch
          101 kB
          Jesus Camacho Rodriguez
        5. HIVE-16614.01.patch
          87 kB
          Jesus Camacho Rodriguez
        6. HIVE-16614.patch
          86 kB
          Jesus Camacho Rodriguez

          Issue Links

            Activity

              People

              • Assignee:
                jcamachorodriguez Jesus Camacho Rodriguez
                Reporter:
                cartershanklin Carter Shanklin
              • Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: