You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Uroš Bojanić (Jira)" <ji...@apache.org> on 2026/08/12 09:43:00 UTC
[jira] [Resolved] (SPARK-58710) Remove unused members from the decision tree Node classes
[ https://issues.apache.org/jira/browse/SPARK-58710?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Uroš Bojanić resolved SPARK-58710.
----------------------------------
Fix Version/s: 4.3.0
Resolution: Fixed
Issue resolved by pull request 57928
[https://github.com/apache/spark/pull/57928]
> Remove unused members from the decision tree Node classes
> ---------------------------------------------------------
>
> Key: SPARK-58710
> URL: https://issues.apache.org/jira/browse/SPARK-58710
> Project: Spark
> Issue Type: Improvement
> Components: MLlib
> Affects Versions: 4.3.0
> Reporter: Uroš Bojanić
> Assignee: Uroš Bojanić
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.3.0
>
>
> The decision tree Node classes carry members with no callers.
> In mllib/tree/model/Node.scala: deepCopy (which only ever calls itself recursively), and the companion helpers isLeftChild, maxNodesInLevel, startIndexInLevel, emptyNode, parentIndex, getNode and indexToLevel.
> In ml/tree/Node.scala, whose comment notes the indexing methods were copied from the mllib class: the deepCopy declaration and its two overrides, plus parentIndex, isLeftChild, maxNodesInLevel, startIndexInLevel and getNode.
> The live members are kept: apply, leftChildIndex and rightChildIndex in both objects, and emptyNode and indexToLevel in LearningNode, which RandomForest still calls. The last callers of the removed helpers disappeared when the decision tree implementation moved from spark.mllib to spark.ml.
> Nothing here is public API: the mllib companion is private[spark] and deepCopy is private[tree], so there is no binary compatibility impact and no MimaExcludes entry is needed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org