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


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/exchange/EnablePipelinedShuffle.scala:
##########
@@ -127,24 +132,19 @@ object EnablePipelinedShuffle extends Rule[SparkPlan] {
    * True if any [[ShuffleExchangeExec]] in `plan` is read by an operator the 
channel transport
    * cannot serve. The unsupported operators (see class doc for why each is 
fatal) are
    * `CoalesceExec`, `CartesianProductExec`, and the limit operators 
`CollectLimitExec` /
-   * `CollectTailExec` / `TakeOrderedAndProjectExec`. For each such operator 
anywhere in the plan,
-   * check whether a shuffle is reachable below it.
-   *
-   * The reachability walk descends through EVERY child of a non-exchange node 
-- not only unary
-   * children -- so a shuffle behind a `UnionExec`/join (a `BinaryExecNode`) 
beneath the operator
-   * is still found. It stops at the FIRST [[ShuffleExchangeExec]] on each 
path: a shuffle deeper
-   * than that first one is not read by this operator (the intervening 
exchange's own reader reads
-   * one reduce partition per task), so it is not this operator's concern.
+   * `CollectTailExec` / `TakeOrderedAndProjectExec`, plus cached 
`AttachDistributedSequenceExec`.
+   * A shuffle above an unsupported operator with shuffle-free input does not 
disqualify the plan.

Review Comment:
   Addressed in 
[7dc97ed2cc1](https://github.com/apache/spark/pull/59523/commits/7dc97ed2cc140b0211b70872f238073f5d423f8e).
   
   Clarified that the ancestry check inspects visible exchanges and does not 
inspect shuffles created inside operators. Removed the shuffle-free limit 
assertions while retaining visible-shuffle rejection coverage for all three 
limit operators. No production eligibility behavior changed.
   
   All eight `EnablePipelinedShuffleSuite` tests and the SQL production/test 
scalastyle checks passed. The pre-existing hidden top-K failure is tracked 
separately in [SPARK-61517](https://issues.apache.org/jira/browse/SPARK-61517).



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