[ https://issues.apache.org/jira/browse/SPARK-36580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dongjoon Hyun resolved SPARK-36580. ----------------------------------- Fix Version/s: 3.3.0 Resolution: Fixed Issue resolved by pull request 33829 [https://github.com/apache/spark/pull/33829] > Replace filter and contains with intersect > ------------------------------------------ > > Key: SPARK-36580 > URL: https://issues.apache.org/jira/browse/SPARK-36580 > Project: Spark > Issue Type: Improvement > Components: Spark Core > Affects Versions: 3.3.0 > Reporter: Yang Jie > Assignee: Yang Jie > Priority: Minor > Fix For: 3.3.0 > > > filter on Set can use intersect instead > > *before* > {code:java} > val set = Set(1, 2) > val others = Set(2, 3) > set.filter(others.contains(_)) > {code} > *after* > {code:java} > val set = Set(1, 2) > val others = Set(2, 3) > set.intersect(others) > {code} > Semantic consistency, but it looks simpler -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org