xuanyuanking commented on a change in pull request #27516:
[SPARK-30556][SQL][FOLLOWUP] Reset the status changed in
SQLExecution.withThreadLocalCaptured
URL: https://github.com/apache/spark/pull/27516#discussion_r376916605
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/SQLExecution.scala
##########
@@ -177,9 +177,17 @@ object SQLExecution {
val sc = sparkSession.sparkContext
val localProps = Utils.cloneProperties(sc.getLocalProperties)
Future {
+ val originalContext = SparkSession.getActiveSession
+ val originalLocalProps = Utils.cloneProperties(sc.getLocalProperties)
Review comment:
> I think clone is required.
The two scenarios are different, the first one needs clone since we want a
`snapshot` of local properties during submit. But for this one, we need to
reset by the variable self. If use clone here, changes in other places might be
dropped.
> Also i dont see why we need to reset.
For the function added in SQLExecution here, I think we need to clean up all
the side effects as far as possible, even though it works in this case.
----------------------------------------------------------------
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]