You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/04/05 11:55:27 UTC

[GitHub] [spark] attilapiros commented on a change in pull request #24301: [SPARK-27391][SS] Don't initialize a lazy val in ContinuousExecution job.

attilapiros commented on a change in pull request #24301: [SPARK-27391][SS] Don't initialize a lazy val in ContinuousExecution job.
URL: https://github.com/apache/spark/pull/24301#discussion_r272554273
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/continuous/ContinuousExecution.scala
 ##########
 @@ -251,12 +251,8 @@ class ContinuousExecution(
 
       updateStatusMessage("Running")
       reportTimeTaken("runContinuous") {
-        SQLExecution.withNewExecutionId(
-          sparkSessionForQuery, lastExecution) {
-          // Materialize `executedPlan` so that accessing it when `toRdd` is running doesn't need to
-          // wait for a lock
-          lastExecution.executedPlan
-          lastExecution.toRdd
+        SQLExecution.withNewExecutionId(sparkSessionForQuery, lastExecution) {
+          lastExecution.executedPlan.execute()
 
 Review comment:
   Looks good as it really just skip the assignment of the lazy val and uses the value of the right side of the assignment:
   
   https://github.com/apache/spark/blob/07b79c58618488ced10e7c29b78eaca1a64328e2/sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala#L98

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org