HyukjinKwon opened a new pull request, #47341:
URL: https://github.com/apache/spark/pull/47341

   ### What changes were proposed in this pull request?
   
   This PR proposes to remove `repartition(1)` added in 
https://github.com/apache/spark/pull/47328. We actually don't need this when 
the input is single row as it creates only single partition:
   
   
https://github.com/apache/spark/blob/e5e751b98f9ef5b8640079c07a9a342ef471d75d/sql/core/src/main/scala/org/apache/spark/sql/execution/LocalTableScanExec.scala#L49-L57
 
   
   ### Why are the changes needed?
   
   To avoid unnecessary shuffle.
   
   Before:
   
   ```
   == Physical Plan ==
   AdaptiveSparkPlan isFinalPlan=false
   +- Exchange SinglePartition, REPARTITION_BY_NUM, [plan_id=6]
      +- LocalTableScan [_1#0]
   ```
   
   After:
   
   ```
   == Physical Plan ==
   LocalTableScan [_1#2]
   ``` 
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   CI in this PR should verify the change
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.


-- 
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: reviews-unsubscr...@spark.apache.org

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

Reply via email to