[
https://issues.apache.org/jira/browse/SPARK-59172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Uroš Bojanić updated SPARK-59172:
---------------------------------
Summary: Use isEmpty/nonEmpty instead of size comparisons in core (was:
Use isEmpty instead of size == 0 in core tests)
> Use isEmpty/nonEmpty instead of size comparisons in core
> --------------------------------------------------------
>
> Key: SPARK-59172
> URL: https://issues.apache.org/jira/browse/SPARK-59172
> Project: Spark
> Issue Type: Improvement
> Components: Spark Core
> Affects Versions: 4.4.0
> Reporter: Uroš Bojanić
> Priority: Minor
> Labels: pull-request-available
>
> Several core test suites check collection emptiness with 'size == 0' instead
> of the more direct 'isEmpty'. This replaces 11 such occurrences across 6 test
> suites (MapOutputTrackerSuite, SparkTestSuite,
> StandaloneDynamicAllocationSuite, TaskSetManagerSuite, BlockManagerSuite,
> NextIteratorSuite) with 'isEmpty'. Behavior is unchanged. Note: two
> main-source occurrences (BlockManager, ShuffleBlockFetcherIterator) are
> intentionally left unchanged because there 'buf.size' is a ManagedBuffer byte
> count, not a collection size (ManagedBuffer has no isEmpty). Counterpart of
> SPARK-59149 (SQL modules); a separate PR covers MLlib.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]