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_r397862880
 
 

 ##########
 File path: 
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLCLIDriver.scala
 ##########
 @@ -139,16 +149,6 @@ private[hive] object SparkSQLCLIDriver extends Logging {
       // Hive 1.2 + not supported in CLI
       throw new RuntimeException("Remote operations not supported")
     }
-    // Respect the configurations set by --hiveconf from the command line
-    // (based on Hive's CliDriver).
-    val hiveConfFromCmd = 
sessionState.getOverriddenConfigurations.entrySet().asScala
-    val newHiveConf = hiveConfFromCmd.map { kv =>
-      // If the same property is configured by spark.hadoop.xxx, we ignore it 
and
-      // obey settings from spark properties
-      val k = kv.getKey
-      val v = sys.props.getOrElseUpdate(SPARK_HADOOP_PROP_PREFIX + k, 
kv.getValue)
 
 Review comment:
   the `cmdProperties` is to latter to take effect here, they don't take part 
in creating `hive.sessionState`, the `newHiveConf` will be set to SQLConf only

----------------------------------------------------------------
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]

Reply via email to