You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2026/09/08 13:44:45 UTC

[PR] [SPARK-59337][ML] Simplify GeneralizedLinearRegressionModel transform implementation [spark]

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59337][ML] Simplify GeneralizedLinearRegressionModel transform implementation [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #58624:
URL: https://github.com/apache/spark/pull/58624#issuecomment-5594593224

   **Merge Summary:**
   - merged into master https://github.com/apache/spark/commit/9de2f8df6f7e69acb140a2763a24c5576c112948
   - merged into branch-4.x https://github.com/apache/spark/commit/94be0b8f5f16c0cd0e999b9de1e9573694cdabd8
   
   *Posted by `merge_spark_pr.py`*


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59337][ML] Simplify GeneralizedLinearRegressionModel transform implementation [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #58624: [SPARK-59337][ML] Simplify GeneralizedLinearRegressionModel transform implementation
URL: https://github.com/apache/spark/pull/58624


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org