You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/09/15 11:04:45 UTC

[GitHub] [hive] kgyrtkirk commented on a change in pull request #1460: Hive 24113

kgyrtkirk commented on a change in pull request #1460:
URL: https://github.com/apache/hive/pull/1460#discussion_r488578302



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFFromUnixTime.java
##########
@@ -107,6 +107,10 @@ public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumen
     }
 
     if (timeZone == null) {
+      if (SessionState.get() == null) {
+        SessionState ss = new SessionState(new HiveConf());
+        SessionState.setCurrentSessionState(ss);

Review comment:
       please don't start a new session here
   * in case you don't have a session - you may read this info from a `new HiveConf()`
   * bumping into this issue from the HMS side is kinda unexpected - could you please leave a note about why this is needed here
   * could you cover this issue with a testcase - or that's not possible because we are running embedded metastore in the 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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org