[ 
https://issues.apache.org/jira/browse/HIVE-16614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jesus Camacho Rodriguez updated HIVE-16614:
-------------------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0
           Status: Resolved  (was: Patch Available)

Pushed to master, thanks for reviewing [~ashutoshc]!

A few notes:
* This fix changes 'TIMESTAMP WITH TIME ZONE' to 'TIMESTAMP WITH LOCAL TIME 
ZONE' type. To be compliant with SQL standard, 'TIMESTAMP WITH TIME ZONE' 
should store the time-zone displacement within the data value, however our 
current type does not. Since we might aim at having 'TIMESTAMP WITH TIME ZONE' 
conforming to the standard in the longer term, plus there has not been any 
release since 'TIMESTAMP WITH TIME ZONE' was introduced, we make this change to 
cause less confusion for end users.
* FWIW, Postgres implementation of 'TIMESTAMP WITH TIME ZONE' does not conform 
to the standard and its semantics are equivalent to 'TIMESTAMP WITH LOCAL TIME 
ZONE'.
* Other RDBMSs also have both 'TIMESTAMP WITH LOCAL TIME ZONE' and 'TIMESTAMP 
WITH TIME ZONE' types.
* Finally, I will create a follow-up to fix 'TIMESTAMP' type semantics so they 
are not dependent on the system timezone anymore. While 'TIMESTAMP' type will 
be compliant with SQL semantics, I will also take care that we are backwards 
compatible and old 'TIMESTAMP' typed values continue being accessible in the 
same way. (More in the issue to come)

> Support "set local time zone" statement
> ---------------------------------------
>
>                 Key: HIVE-16614
>                 URL: https://issues.apache.org/jira/browse/HIVE-16614
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Carter Shanklin
>            Assignee: Jesus Camacho Rodriguez
>             Fix For: 3.0.0
>
>         Attachments: HIVE-16614.01.patch, HIVE-16614.02.patch, 
> HIVE-16614.03.patch, HIVE-16614.04.patch, HIVE-16614.05.patch, 
> HIVE-16614.patch
>
>
> 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



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to