HyukjinKwon commented on a change in pull request #23837: [SPARK-26929][SQL]fix
table owner use user instead of principal when …
URL: https://github.com/apache/spark/pull/23837#discussion_r258346527
##########
File path:
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
##########
@@ -186,7 +187,12 @@ private[hive] class HiveClientImpl(
/** Returns the configuration for the current session. */
def conf: HiveConf = state.getConf
- private val userName = conf.getUser
+ private val userName: String = try {
+ val ugi = HiveUtils.getUGI
+ ugi.getShortUserName
+ } catch {
+ case e: LoginException => throw new IOException(e)
+ }
Review comment:
Given this is a fix for forth and back
(https://github.com/apache/spark/pull/20034 and
https://github.com/apache/spark/pull/17363), can you test if the metastore is
MySQL as well?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]