cloud-fan commented on a change in pull request #27659: [SPARK-30906][SQL]
Turning off AQE in CacheManager is not thread-safe
URL: https://github.com/apache/spark/pull/27659#discussion_r382395787
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala
##########
@@ -341,4 +334,18 @@ object QueryExecution {
val sparkPlan = createSparkPlan(spark, spark.sessionState.planner,
plan.clone())
prepareExecutedPlan(spark, sparkPlan)
}
+
+ /**
+ * Returns a cloned [[SparkSession]] with adaptive execution disabled, or
the original
+ * [[SparkSession]] if its adaptive execution is already disabled.
+ */
+ def getOrCreateSparkSessionWithAdaptiveExecutionOff[T](session:
SparkSession): SparkSession = {
Review comment:
the name is so long... how about `getOrCloneSessionWithAQEOff`?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]