You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/08/13 08:33:11 UTC

[GitHub] [spark] wangyum commented on a change in pull request #24566: [SPARK-27667][SQL] Get the current database from spark catalog instead of querying the Hive

wangyum commented on a change in pull request #24566: [SPARK-27667][SQL] Get the current database from spark catalog instead of querying the Hive
URL: https://github.com/apache/spark/pull/24566#discussion_r313276949
 
 

 ##########
 File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
 ##########
 @@ -249,9 +249,12 @@ private[hive] object SparkSQLCLIDriver extends Logging {
 
     var ret = 0
     var prefix = ""
-    val currentDB = ReflectionUtils.invokeStatic(classOf[CliDriver], "getFormattedDb",
-      classOf[HiveConf] -> conf, classOf[CliSessionState] -> sessionState)
-
+    def currentDB = if (sparkConf.getBoolean("spark.cli.print.current.db", false)) {
 
 Review comment:
   Please add the SQL related conf to `SQLConf`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org