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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]