ajithme commented on a change in pull request #27267: [SPARK-30556][SQL] Copy
sparkContext.localproperties to child thread inSubqueryExec.executionContext
URL: https://github.com/apache/spark/pull/27267#discussion_r368880378
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/basicPhysicalOperators.scala
##########
@@ -749,9 +749,11 @@ case class SubqueryExec(name: String, child: SparkPlan)
private lazy val relationFuture: Future[Array[InternalRow]] = {
// relationFuture is used in "doExecute". Therefore we can get the
execution id correctly here.
val executionId =
sparkContext.getLocalProperty(SQLExecution.EXECUTION_ID_KEY)
+ val localProps = Utils.cloneProperties(sparkContext.getLocalProperties)
Future {
// This will run in another thread. Set the execution id so that we can
connect these jobs
// with the correct execution.
+ sparkContext.setLocalProperties(localProps)
Review comment:
yes, if the subquery output depends on the task properties, it will affect.
I have added a UT case to simulate the behaviour
----------------------------------------------------------------
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]