Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/20136#discussion_r159239867
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala ---
@@ -70,7 +71,10 @@ object SQLConf {
* Default config. Only used when there is no active SparkSession for
the thread.
* See [[get]] for more information.
*/
- private val fallbackConf = new ThreadLocal[SQLConf] {
+ private lazy val fallbackConf = new ThreadLocal[SQLConf] {
+ // assert that we're only accessing it on the driver.
+ assert(SparkEnv.get.executorId == SparkContext.DRIVER_IDENTIFIER)
--- End diff --
Need null checks for `SparkEnv`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]