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

   …ext to avoid clash of stageIDs when sharing the stages
   ### What changes were proposed in this pull request?
   Move the currentStageId counter from AdaptiveSparkPlanExec to 
AdativeExecutionContext.
    
   ### Why are the changes needed?
   The counter is initialized in the constructor of AdaptiveSparkPlanExec as
   private var currentStageId = 0 
   but the previous stages encountered in the subplans and cached in stageCache 
field of AdaptiveExecutionContext are bound to clash with IDs generated in the 
current AdaptiveSparkPlanExec.
   As of now in the stock spark code, those Ids are not used for lookups ( 
instead its the canonicalized plans which are used), so there are no issues. ( 
atleast there are no failing tests and possibly no scope of bug).
    
   May be to make the code safer for future , the currentStageId should be 
moved as a var field in AdaptiveExecutionContext , to guarantee uniqueness 
among all the stages seen within an AdaptiveExecutionContext.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Existing tests passing should be sufficient, though will write a dedicated 
unit test.
   
   
   ### 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: [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