[
https://issues.apache.org/jira/browse/SPARK-34118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yang Jie updated SPARK-34118:
-----------------------------
Description:
Semantic consistency and code Simpilefications
before:
{code:java}
seq.filter(p).size == 0)
seq.filter(p).length > 0
seq.filterNot(p).isEmpty
seq.filterNot(p).nonEmpty
{code}
after:
{code:java}
!seq.exists(p)
seq.exists(p)
seq.forall(p)
!seq.forall(p)
{code}
> Replaces filter and check for emptiness with exists or forall.
> --------------------------------------------------------------
>
> Key: SPARK-34118
> URL: https://issues.apache.org/jira/browse/SPARK-34118
> Project: Spark
> Issue Type: Improvement
> Components: Spark Core, SQL
> Affects Versions: 3.2.0
> Reporter: Yang Jie
> Priority: Minor
>
> Semantic consistency and code Simpilefications
> before:
> {code:java}
> seq.filter(p).size == 0)
> seq.filter(p).length > 0
> seq.filterNot(p).isEmpty
> seq.filterNot(p).nonEmpty
> {code}
> after:
> {code:java}
> !seq.exists(p)
> seq.exists(p)
> seq.forall(p)
> !seq.forall(p)
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]