yaooqinn commented on a change in pull request #27969: 
[SPARK-31170][SQL][test-hive1.2] Spark SQL Cli should respect hive-site.xml and 
spark.sql.warehouse.dir
URL: https://github.com/apache/spark/pull/27969#discussion_r397865139
 
 

 ##########
 File path: 
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
 ##########
 @@ -177,28 +177,29 @@ private[hive] object SparkSQLCLIDriver extends Logging {
       sessionState.info = new PrintStream(System.err, true, UTF_8.name())
       sessionState.err = new PrintStream(System.err, true, UTF_8.name())
     } catch {
-      case e: UnsupportedEncodingException => System.exit(3)
+      case _: UnsupportedEncodingException => System.exit(3)
     }
 
-    if (sessionState.database != null) {
+    if (dummySessionState.database != null) {
 
 Review comment:
   because of the HiveConf instance which `sessionState` uses to initialize 
itself need a full scope of all configurations including spark confs, hadoop 
confs, hive-site.xml, and command-line properties.  the command-line properties 
need be gen first.

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


With regards,
Apache Git Services

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

Reply via email to