You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "cloud-fan (via GitHub)" <gi...@apache.org> on 2023/02/15 14:12:44 UTC

[GitHub] [spark] cloud-fan commented on a diff in pull request #40036: [SPARK-42448][SQL] Fix spark sql shell prompt for current db

cloud-fan commented on code in PR #40036:
URL: https://github.com/apache/spark/pull/40036#discussion_r1107177853


##########
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala:
##########
@@ -278,8 +278,16 @@ 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: String = {
+      val printCurrentDb = conf.getBoolVar(HiveConf.ConfVars.CLIPRINTCURRENTDB) ||

Review Comment:
   so there is already a hive conf to control this behavior?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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