wecharyu opened a new issue, #12702:
URL: https://github.com/apache/gluten/issues/12702

   ### Backend
   
   VL (Velox)
   
   ### Bug description
   
   `GlutenAutoAdjustStageResourceProfile` currently treats every 
non-`GlutenPlan` node as a fallback node when calculating the fallback-node 
ratio. This incorrectly counts structural or framework nodes that do not 
execute fallback work, and may insert unnecessary `ApplyResourceProfileExec`.
   
   For example, the following stage does not have actual Spark fallback 
operator:
   ```bash
   ColumnarBroadcastExchange
   +- AQEShuffleRead
      +- ShuffleQueryStage
   ```
   But in current logic, fallenNodeCnt is 2, totalCount is 3, and the fallback 
ratio is 2 / 3 > 0.5.
   
   ## Proposed fix
   Inspired by the existing fallback-node handling in 
`GlutenExplainUtils.isFallbackNode` and `GlutenImplicits.collectFallbackNodes`, 
which treat some Spark nodes as non-fallback nodes.
   
   We can reuse this check logic when calculating fallback ratio in 
`GlutenAutoAdjustStageResourceProfile`.
   
   ### Gluten version
   
   main branch
   
   ### Spark version
   
   _No response_
   
   ### Spark configurations
   
   _No response_
   
   ### System information
   
   _No response_
   
   ### Relevant logs
   
   ```bash
   
   ```


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