deniskuzZ commented on code in PR #4180:
URL: https://github.com/apache/hive/pull/4180#discussion_r1175752446
##########
service/src/java/org/apache/hive/service/cli/session/HiveSessionImpl.java:
##########
@@ -432,6 +432,18 @@ private synchronized void releaseBeforeOpLock(boolean
userAccess) {
sessionState.resetThreadName();
}
+ // We have already set the thread-local Hive belonging to the current
session,
+ // if the thread-local Hive has been changed/updated after running the
operation,
+ // the Hive after should belong to the same session, and we should update
the sessionHive.
+ // The thread-local hive would be recreated only when the underlying
+ // HiveMetaStoreClient is incompatible with the newest session conf.
+ Hive localHive = Hive.getThreadLocal();
+ if (localHive != null && localHive != sessionHive) {
Review Comment:
we can skip null check
--
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]