Uroš Bojanić created SPARK-59173:
------------------------------------
Summary: Use isEmpty instead of size == 0 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ć
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]