maropu commented 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. 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: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
