Github user ravipesala commented on the pull request:
https://github.com/apache/spark/pull/4812#issuecomment-76454856
@chenghao-intel Thank you for your implementation, following are my
observations
Implementation seems simple but it comes with lot of limitations. The query
like below
```
select C from R1 where exists (Select B from R2 where R1.X = R2.Y)
```
would be converted as below in case of your implementation I guess
```
select C from R1 left semi join R2 on R1.X = R2.Y
```
But it syntactically not correct. it supposed to be converted as follow.
```
select C
from R1 left semi join
(select B, R2.Y as sq1_col0 from R2) sq1
on R1.X = sq1.sq1_col0
```
Both ```exists``` and ```in``` implementations should be similar. Just add
```exists``` support in parser would be enough and remaining implementation is
almost similar. Not only the above case there are lot of other scenarios need
to be taken care in subquery expressions. Please refer
https://issues.apache.org/jira/secure/attachment/12614003/SubQuerySpec.pdf.
I am waiting to get my code merged so that I am planning to add all the
remaining features on top of it.
---
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]