[ 
https://issues.apache.org/jira/browse/SPARK-60461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated SPARK-60461:
-----------------------------------
    Labels: pull-request-available  (was: )

> Restore Strategy constructor binary compatibility
> -------------------------------------------------
>
>                 Key: SPARK-60461
>                 URL: https://issues.apache.org/jira/browse/SPARK-60461
>             Project: Spark
>          Issue Type: Bug
>          Components: MLlib
>    Affects Versions: 4.3.0
>            Reporter: Ruifeng Zheng
>            Priority: Major
>              Labels: pull-request-available
>
> SPARK-34591 / apache/spark#55763 inserted pruneTree before bootstrap in the 
> primary constructor of org.apache.spark.mllib.tree.configuration.Strategy. 
> This changed the JVM constructor from 15 to 16 parameters. A Scala client 
> compiled against Spark 4.2.0, such as new Strategy(Algo.Classification, Gini, 
> maxDepth = 3), fails with NoSuchMethodError on the current 4.3 branch.
> The insertion also changed constructor default getter 15 from bootstrap=false 
> to pruneTree=true. Adding only a compatibility overload would therefore 
> silently change the behavior of previously compiled callers that use defaults.
> Restore the original 15-argument constructor as an overload delegating with 
> pruneTree=true, and retain bootstrap in its original parameter position in 
> the primary constructor. Update Strategy.copy to pass pruneTree by name and 
> remove the MiMa exclusion for Strategy.this. Add regression tests for the old 
> constructor signature, bootstrap default getter, and independent 
> pruning/bootstrapping configuration.
> The fix was verified by compiling a client against the published Spark 4.2.0 
> artifact and running it against both 4.2.0 and the patched class. The 
> regression suite's three tests pass. The patch applies cleanly to branch-4.3. 
> Backports are intended for branch-4.x and branch-4.3.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to