GitHub user ueshin opened a pull request:
https://github.com/apache/spark/pull/22052
[SPARK-25068][SQL] Add exists function.
## What changes were proposed in this pull request?
This pr adds `exists` function which tests whether a predicate holds for
one or more elements in the array.
```sql
> SELECT exists(array(1, 2, 3), x -> x % 2 == 0);
true
```
## How was this patch tested?
Added tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ueshin/apache-spark issues/SPARK-25068/exists
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/22052.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #22052
----
commit 9b47b027d572dd90149a7ffd928a9ede256dae29
Author: Takuya UESHIN <ueshin@...>
Date: 2018-08-08T09:08:16Z
Add exists function.
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]