You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/12/15 16:20:13 UTC
[GitHub] [spark] yaooqinn commented on a change in pull request #30642: [SPARK-32991][SQL] [FOLLOWUP] Reset command relies on session initials first
yaooqinn commented on a change in pull request #30642:
URL: https://github.com/apache/spark/pull/30642#discussion_r543487326
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/internal/BaseSessionStateBuilder.scala
##########
@@ -92,15 +82,15 @@ abstract class BaseSessionStateBuilder(
parentState.map { s =>
val cloned = s.conf.clone()
if (session.sparkContext.conf.get(StaticSQLConf.SQL_LEGACY_SESSION_INIT_WITH_DEFAULTS)) {
- mergeSparkConf(cloned, session.sparkContext.conf)
+ SQLConf.mergeSparkConf(cloned, session.sparkContext.conf)
}
cloned
}.getOrElse {
val conf = new SQLConf
- mergeSparkConf(conf, session.sparkContext.conf)
- options.foreach {
- case (k, v) => conf.setConfString(k, v)
- }
+ SQLConf.mergeSparkConf(conf, session.sharedState.conf)
+ // the later added configs to spark conf shall be respected too
+ SQLConf.mergeNonStaticSQLConfigs(conf, session.sparkContext.conf.getAll.toMap)
+ SQLConf.mergeNonStaticSQLConfigs(conf, session.initialSessionOptions)
Review comment:
it is same as session.initialSessionOptions
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org