You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/02/25 01:08:12 UTC

[GitHub] maropu edited a comment on issue #23783: [SPARK-26854][SQL] Support ANY/SOME subquery

maropu edited a comment on issue #23783: [SPARK-26854][SQL] Support ANY/SOME subquery
URL: https://github.com/apache/spark/pull/23783#issuecomment-466838751
 
 
   Thanks for the survey!
   It seems most databses support multi-column IN and single-column ANY, right?
   MySQL do so;
   ```
   mysql> select * from t1;
   +------+------+
   | t1a  | t1b  |
   +------+------+
   |    1 |    5 |
   +------+------+
   
   mysql> select * from t2;
   +------+------+
   | t2a  | t2b  |
   +------+------+
   |    1 |    2 |
   |    1 |    5 |
   +------+------+
   
   mysql> select * from t1 where (t1a, t1b) IN (select t2a, t2b from t2);
   +------+------+
   | t1a  | t1b  |
   +------+------+
   |    1 |    5 |
   +------+------+
   
   mysql> select * from t1 where (t1a, t1b) = ANY (select t2a, t2b from t2);
   +------+------+
   | t1a  | t1b  |
   +------+------+
   |    1 |    5 |
   +------+------+
   
   mysql> select * from t1 where (t1a, t1b) != ANY (select t2a, t2b from t2);
   ERROR 1241 (21000): Operand should contain 1 column(s)
   ````
   
   Based on the survey, how about supporting single-column  ANY first (throwing an analysis exception for multi-column ANY)? IMHO its ok that multi-column ANY is future work, then. 
   
   At least, its hard to review the current pr cuz there are so many tests that we should check...
   
   Any suggestion? @gatorsmile @dilipbiswal 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org