[
https://issues.apache.org/jira/browse/SPARK-59173?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dongjoon Hyun resolved SPARK-59173.
-----------------------------------
Fix Version/s: 5.0.0
Resolution: Fixed
Issue resolved by pull request 58471
[https://github.com/apache/spark/pull/58471]
> Use isEmpty/nonEmpty instead of size comparisons in MLlib
> ---------------------------------------------------------
>
> Key: SPARK-59173
> URL: https://issues.apache.org/jira/browse/SPARK-59173
> Project: Spark
> Issue Type: Improvement
> Components: ML
> Affects Versions: 4.4.0
> Reporter: Uroš Bojanić
> Assignee: Uroš Bojanić
> Priority: Minor
> Labels: pull-request-available
> Fix For: 5.0.0
>
>
> Replaces the 'size == 0' collection-emptiness idiom with 'isEmpty' in the
> mllib module (3 occurrences): TreeEnsembleModel (ml/tree/treeModels.scala,
> main) where totalImportances is an OpenHashMap (extends Iterable), and two
> filtered Seq[ShuffleDependency] checks in ALSSuite (test). ChiSqTest is
> intentionally left unchanged: there expected.size / observed.size are the
> dimensions of an mllib.linalg.Vector (with a numeric == 0.0 comparison), not
> a collection size, and Vector has no isEmpty. Counterpart of SPARK-59149
> (SQL) and SPARK-59172 (core).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]