cloud-fan commented on a change in pull request #24706: [SPARK-23128][SQL] A
new approach to do adaptive execution in Spark SQL
URL: https://github.com/apache/spark/pull/24706#discussion_r289110657
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/BroadcastExchangeExec.scala
##########
@@ -58,11 +58,21 @@ case class BroadcastExchangeExec(
BroadcastExchangeExec(mode.canonicalized, child.canonicalized)
}
+ @transient
+ private lazy val promise = Promise[broadcast.Broadcast[Any]]()
+
+ /**
+ * For registering callbacks on `relationFuture`.
+ * Note that calling this field will not start the execution of broadcast
job.
+ */
+ @transient
+ lazy val completionFuture: scala.concurrent.Future[broadcast.Broadcast[Any]]
= promise.future
+
@transient
private val timeout: Long = SQLConf.get.broadcastTimeout
@transient
- private lazy val relationFuture: Future[broadcast.Broadcast[Any]] = {
+ private[sql] lazy val relationFuture: Future[broadcast.Broadcast[Any]] = {
Review comment:
can we just change this to scala future?
----------------------------------------------------------------
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]