Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/20136#discussion_r159247039
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala ---
@@ -70,7 +72,12 @@ 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] {
+ if (Utils.isTesting && SparkEnv.get != null) {
--- End diff --
shall we just put this check in the constructor?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]