Skip to content

Commit 92b0baa

Browse files
committed
docs: link Spark AQE physical-root reuse behavior
1 parent e195563 commit 92b0baa

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎spark/src/main/scala/org/apache/comet/rules/CometExecRule.scala‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,14 @@ case class CometExecRule(session: SparkSession)
654654
// originalPlan can still point to a subtree hidden inside that logical leaf, which
655655
// AQE cannot replace in the current logical plan. Only preserve a direct stage link,
656656
// not a link inherited from an ancestor.
657+
// On the ordinary exchange path, the exchange itself is behind a QueryStageExec
658+
// leaf and is not visited by this transform.
659+
// Spark 4.1.3 returns the existing root in LogicalQueryStageStrategy and then calls
660+
// setLogicalLink from SparkStrategies.plan:
661+
// scalastyle:off line.size.limit
662+
// https://github.com/apache/spark/blob/v4.1.3/sql/core/src/main/scala/org/apache/spark/sql/execution/adaptive/LogicalQueryStageStrategy.scala#L64-L65
663+
// https://github.com/apache/spark/blob/v4.1.3/sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala#L78-L87
664+
// scalastyle:on line.size.limit
657665
op
658666
case op: CometExec =>
659667
if (op.originalPlan.logicalLink.isEmpty) {

0 commit comments

Comments
 (0)