[ 
https://issues.apache.org/jira/browse/HIVE-22170?focusedWorklogId=311846&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-311846
 ]

ASF GitHub Bot logged work on HIVE-22170:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Sep/19 01:58
            Start Date: 13/Sep/19 01:58
    Worklog Time Spent: 10m 
      Work Description: vineetgarg02 commented on pull request #764: HIVE-22170
URL: https://github.com/apache/hive/pull/764#discussion_r323995778
 
 

 ##########
 File path: 
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToUnixTimeStamp.java
 ##########
 @@ -117,6 +121,19 @@ protected void initializeInput(ObjectInspector[] 
arguments) throws UDFArgumentEx
             + " takes only string/date/timestamp/timestampwltz types. Got 
Type:" + arg1OI
             .getPrimitiveCategory().name());
     }
+
+    if (timeZone == null) {
+      timeZone = SessionState.get().getConf().getLocalTimeZone();
+      formatter.setTimeZone(TimeZone.getTimeZone(timeZone));
+    }
+  }
+
+  public void configure(MapredContext context) {
 
 Review comment:
   Is this for testing purpose only? Can't find who is calling this beside 
tests.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 311846)

> from_unixtime and unix_timestamp should use user session time zone
> ------------------------------------------------------------------
>
>                 Key: HIVE-22170
>                 URL: https://issues.apache.org/jira/browse/HIVE-22170
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 3.1.0, 4.0.0, 3.2.0, 3.1.1, 3.1.2
>            Reporter: Riju Trivedi
>            Assignee: Jesus Camacho Rodriguez
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-22170.01.patch, HIVE-22170.02.patch, 
> HIVE-22170.03.patch, HIVE-22170.04.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> According to documentation, that is the expected behavior (since session time 
> zone was not present, system time zone was being used previously). This was 
> incorrectly changed by HIVE-12192 / HIVE-20007. This JIRA should fix this 
> issue.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to