adesh-rao commented on a change in pull request #2447:
URL: https://github.com/apache/hive/pull/2447#discussion_r665922243



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/udf/UDFToByte.java
##########
@@ -211,7 +217,10 @@ public ByteWritable evaluate(TimestampWritableV2 i) {
     if (i == null) {
       return null;
     } else {
-      final long longValue = i.getSeconds();
+      ZoneId zone = SessionState.get() == null ?
+        new HiveConf().getLocalTimeZone() : 
SessionState.get().getConf().getLocalTimeZone();
+      TimestampTZ timestamp = TimestampTZUtil.convert(i.getTimestamp(), zone);

Review comment:
       Can't be done in TimestampTZUtil (it will create a circular dependency 
in common/exec modules). Instead create a new UDFUtils.java for the same.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to