Apache Hive introduced a function named “current_user()” from version 1.2.0 which returns the current user name from the authenticator manager configured. It could be the same as the user provided when connecting, but it might be different for certain authentication managers (e.g. HadoopDefaultAuthenticator).
Apache Hive introduced a function named “logged_in_user()” from version 2.2.0 which returns the current user name from the session state. When connecting to Hive, this is the username provided.
Hope you find this article helpful.