jerrypeng commented on code in PR #57692:
URL: https://github.com/apache/spark/pull/57692#discussion_r3706748824


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/runtime/IncrementalExecution.scala:
##########
@@ -663,7 +665,96 @@ class IncrementalExecution(
     }
   }
 
-  override def preparations: Seq[Rule[SparkPlan]] = state +: super.preparations
+  /**
+   * For a Real-Time Mode batch, mark the shuffle exchanges as pipelined so 
the DAGScheduler
+   * co-schedules a stateful query's producer (source scan) and consumer 
(stateful operator) stages
+   * as one pipelined group -- records stream through a transient shuffle 
instead of the consumer
+   * waiting for the producer to fully materialize. The exchange carries the 
decision as a field
+   * (see ShuffleExchangeExec.pipelined); the PipelinedShuffleDependency it 
then builds is the whole
+   * opt-in -- routing to the streaming shuffle manager and pipelined-group 
scheduling both follow
+   * from that dependency type.
+   *
+   * Real-Time Mode is detected structurally by a RealTimeStreamScanExec leaf 
(there is no
+   * RTM-specific plan flag). Inert for a non-RTM batch, so the ordinary 
microbatch path is
+   * unchanged.
+   *
+   * Marks EVERY shuffle exchange, so a plan with several pipelined shuffles 
in a chain (e.g. two

Review Comment:
   will reword



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