dongjoon-hyun commented on a change in pull request #24566: [SPARK-27667][SQL]
support display of current Database in the spark-sql CLI
URL: https://github.com/apache/spark/pull/24566#discussion_r354953712
##########
File path:
sql/hive-thriftserver/src/test/scala/org/apache/spark/sql/hive/thriftserver/CliSuite.scala
##########
@@ -400,4 +400,21 @@ class CliSuite extends SparkFunSuite with
BeforeAndAfterAll with Logging {
-> "1.000000000000000000"
)
}
+
+ test("SPARK-27667 test cli prompt using spark.cli.print.current.db") {
+ runCliWithin(1.minute, Seq("--conf",
"spark.sql.cli.show.current.db=true"))(
+ "show tables;" -> "spark-sql (default)",
+ "CREATE DATABASE hive_test_db;"
+ -> "",
+ "USE hive_test_db;"
+ -> "spark-sql (hive_test_db)"
Review comment:
Since these are short, one line will be enough.
```scala
- "CREATE DATABASE hive_test_db;"
- -> "",
- "USE hive_test_db;"
- -> "spark-sql (hive_test_db)"
+ "CREATE DATABASE hive_test_db;" -> "",
+ "USE hive_test_db;" -> "spark-sql (hive_test_db)"
```
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]