Repository: spark
Updated Branches:
  refs/heads/master 91d1b300d -> 6674acd1e


[SPARK-22846][SQL] Fix table owner is null when creating table through spark 
sql or thriftserver

## What changes were proposed in this pull request?
fix table owner is null when create new table through spark sql

## How was this patch tested?
manual test.
1、first create a table
2、then select the table properties from mysql which connected to hive 
metastore

Please review http://spark.apache.org/contributing.html before opening a pull 
request.

Author: xu.wenchun <xu.wenc...@immomo.com>

Closes #20034 from BruceXu1991/SPARK-22846.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/6674acd1
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/6674acd1
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/6674acd1

Branch: refs/heads/master
Commit: 6674acd1edc8c657049113df95af3378b5db8806
Parents: 91d1b30
Author: xu.wenchun <xu.wenc...@immomo.com>
Authored: Wed Dec 27 10:08:32 2017 +0800
Committer: Wenchen Fan <wenc...@databricks.com>
Committed: Wed Dec 27 10:08:32 2017 +0800

----------------------------------------------------------------------
 .../scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/6674acd1/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
----------------------------------------------------------------------
diff --git 
a/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala 
b/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
index 7233944..7b7f4e0 100644
--- 
a/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
+++ 
b/sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala
@@ -186,7 +186,7 @@ private[hive] class HiveClientImpl(
   /** Returns the configuration for the current session. */
   def conf: HiveConf = state.getConf
 
-  private val userName = state.getAuthenticator.getUserName
+  private val userName = conf.getUser
 
   override def getConf(key: String, defaultValue: String): String = {
     conf.get(key, defaultValue)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to