GitHub user chenghao-intel opened a pull request:
https://github.com/apache/spark/pull/9055
[SPARK-4226][SQL]Add subquery (not) in/exists support
Some known feature that we don't support right now, but will add it later.
We don't support the outer UDAF function used in the correlated query,
combined with
outer having clause, which requires the implicit projection change for the
outer query.
```sql
select b.key, min(b.value)
from src b
group by b.key
having exists (
select a.key
from src a
where a.value > 'val_9' and a.value = min(b.value) -- min(b.value)
implicits requires the outer query to add more field in the projection.
)
```
We don't support the multiple references for the outer query in both the
subquery in both projection and filter clause.
```sql
select key, value
from src b
where value in
(select s1.key+ b.key
from src s1
where s1.key > '9' and s1.value = b.value) -- both b.value and b.key
present in the subquery, but in projection and filter clause respectively.
```
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/chenghao-intel/spark anti_join
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/9055.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 #9055
----
commit e3aa2553cc3eeb78f8bd15a5f97ccd97032bf954
Author: Cheng Hao <[email protected]>
Date: 2015-10-10T00:45:39Z
add subquery (not) in/exists support
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]