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

   ### What changes were proposed in this pull request?
   
   Create the model broadcast in `RandomForestRegressionModel.transform` and
   `GBTRegressionModel.transform` only when at least one of `predictionCol` or 
`leafCol` is set.
   
   ### Why are the changes needed?
   
   When both output columns are empty, these transforms return the input 
unchanged. Previously they
   still serialized and broadcast the entire model, consuming unnecessary 
driver resources despite the
   broadcast never being referenced.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   No tests were added because the output and existing execution branches are 
unchanged. The patch was
   checked with `git diff --check` and source line-length and non-ASCII scans.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-5)
   


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