Github user juliuszsompolski commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20136#discussion_r159408791
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala ---
    @@ -70,7 +72,7 @@ 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] {
    --- End diff --
    
    When I checked (which was before I moved the assertion from here to SQLConf 
constructor, but it shouldn't matter), not having it as lazy resulted in it 
being instantiated eagerly as a static member of SQLConf object before SparkEnv 
was set and hitting the null on SparkEnv.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to