Github user mgaido91 commented on a diff in the pull request: https://github.com/apache/spark/pull/21815#discussion_r203680097 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/SparkPlan.scala --- @@ -69,7 +67,9 @@ abstract class SparkPlan extends QueryPlan[SparkPlan] with Logging with Serializ /** Overridden make copy also propagates sqlContext to copied plan. */ override def makeCopy(newArgs: Array[AnyRef]): SparkPlan = { - SparkSession.setActiveSession(sqlContext.sparkSession) + if (sqlContext != null) { --- End diff -- I see, thanks, I wondered because it seems a more generic issue, easier to happen, but probably we never met it as all the trials included `FileSourceScanExec` which caused an earlier failure... thanks.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org