wangyum opened a new pull request, #11753:
URL: https://github.com/apache/gluten/pull/11753

   ## What changes are proposed in this pull request?
   This pr fixes the issue where Gluten's columnar writer optimization breaks 
shuffle IDs retrieval introduced in [Spark PR 
#51432](https://github.com/apache/spark/pull/51432).
   
   Spark expects to access `AdaptiveSparkPlanExec.shuffleIds` via pattern 
matching:
   ```scala
   queryExecution.executedPlan match {
     case ae: AdaptiveSparkPlanExec =>
       ae.context.shuffleIds.asScala.keys
   }
   ```
   
   This PR refactored the wrapping logic to:
   1. Wrap `aqe.inputPlan` with `genColumnarToCarrierRow()` first → 
`ColumnarToCarrierRow(inputPlan)`
   2. Create a new `AdaptiveSparkPlanExec` with the wrapped child → 
`AdaptiveSparkPlanExec(ColumnarToCarrierRow(...))`
   3. Set `supportsColumnar=false` since the child is already columnar
   
   This preserves `AdaptiveSparkPlanExec` in the plan hierarchy while 
maintaining the columnar write optimization benefits.
   
   ## How was this patch tested?
   Unit test.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   No.
   
   Fixes #11752


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