allisonwang-db commented on a change in pull request #29137: URL: https://github.com/apache/spark/pull/29137#discussion_r466043640
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/AdaptiveSparkPlanExec.scala ########## @@ -279,34 +280,69 @@ case class AdaptiveSparkPlanExec( prefix: String = "", addSuffix: Boolean = false, maxFields: Int, - printNodeId: Boolean): Unit = { - super.generateTreeString(depth, + printNodeId: Boolean, + indent: Int = 0): Unit = { + super.generateTreeString( + depth, lastChildren, append, verbose, prefix, addSuffix, maxFields, + printNodeId, + indent) + generateTreeStringWithHeader( + if (isFinalPlan) "Final Plan" else "Current Plan", Review comment: Since `EXPLAIN FORMATTED` will not actually execute the query, we use `Current Plan` to indicate the *current* query plan, and when the current adaptive query plan is final, we will use `Final Plan`. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org