HyukjinKwon commented on code in PR #41748:
URL: https://github.com/apache/spark/pull/41748#discussion_r1260348862


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala:
##########
@@ -163,19 +172,27 @@ class QueryExecution(
     }
   }
 
+  def assertSparkPlanPrepared(): Unit = sparkPlan

Review Comment:
   ```suggestion
     private[sql] def assertSparkPlanPrepared(): Unit = sparkPlan
   ```



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala:
##########
@@ -150,7 +159,7 @@ class QueryExecution(
     }
   }
 
-  private def assertOptimized(): Unit = optimizedPlan
+  def assertOptimized(): Unit = optimizedPlan

Review Comment:
   ```suggestion
     private[sql] def assertOptimized(): Unit = optimizedPlan
   ```



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/QueryPlanningTracker.scala:
##########
@@ -120,6 +147,29 @@ class QueryPlanningTracker {
     ret
   }
 
+  /**
+   * Set when the query has been analysed.
+   * Can be called multiple times upon plan change.
+   * @param analyzedPlan The plan after analysis,
+   *                     see @org.apache.spark.sql.catalyst.analysis.Analyzer
+   */
+  private[sql] def setAnalyzed(analyzedPlan: LogicalPlan): Unit = {
+    trackerCallback.foreach(_.analyzed(this, analyzedPlan))
+  }
+
+  /**
+   * Set when the query is ready for execution. This is after analysis for
+   * eager commands and after planning for other queries.
+   * see @link org.apache.spark.sql.execution.CommandExecutionMode
+   * When called multiple times, ignores subsequent call.
+   */
+  private[sql] def setReadyForExecution(): Unit = {

Review Comment:
   ```suggestion
     def setReadyForExecution(): Unit = {
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to