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

   ### What changes were proposed in this pull request?
   
   This PR removes the redundant 
`GeneralizedLinearRegressionModel.transformImpl` override and keeps
   its implementation directly in `transform`.
   
   ### Why are the changes needed?
   
   `GeneralizedLinearRegressionModel` must override `transform` because it can 
produce
   `linkPredictionCol` when `predictionCol` is empty, while the base 
`Predictor` implementation only
   invokes `transformImpl` when `predictionCol` is set. Once GLR owns 
`transform`, the separate
   `transformImpl` override is only called by that method and adds an 
unnecessary second
   `transformSchema` invocation.
   
   Inlining the implementation removes this redundant indirection and schema 
validation without
   changing the generated columns.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   The following checks passed:
   
   ```
   build/sbt mllib/compile
   build/sbt 'mllib/testOnly 
org.apache.spark.ml.regression.GeneralizedLinearRegressionSuite'
   ```
   
   `GeneralizedLinearRegressionSuite` ran 29 tests successfully, with one 
ignored test.
   
   ### 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