Skip to content

Commit c804c03

Browse files
author
adachij
committed
SparkSQL CLI must be able to specify an option --database on the command line.
1 parent 6562787 commit c804c03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala

100644100755
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ private[hive] object SparkSQLCLIDriver {
145145
case e: UnsupportedEncodingException => System.exit(3)
146146
}
147147

148+
// use the specified database if specified
149+
cli.processSelectDatabase(sessionState);
150+
148151
// Execute -i init files (always in silent mode)
149152
cli.processInitFiles(sessionState)
150153

0 commit comments

Comments
 (0)