dongjoon-hyun commented on a change in pull request #23783: [SPARK-26854][SQL]
Support ANY/SOME subquery
URL: https://github.com/apache/spark/pull/23783#discussion_r268494095
##########
File path:
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -576,6 +576,7 @@ predicate
: NOT? kind=BETWEEN lower=valueExpression AND upper=valueExpression
| NOT? kind=IN '(' expression (',' expression)* ')'
| NOT? kind=IN '(' query ')'
+ | comparisonOperator kind=(ANY | SOME) '(' query ')'
Review comment:
Hi, @francis0407 . I have some questions beyond of the current
implementation of this PR. Currently, this PR aims to add `ANY/SOME` over a
query.
1. Are we going to extend this to 'ALL' later? e.g. `SELECT 1 > ALL (SELECT
0)` (PostgreSQL example)
2. Are we going to support `array`, too? e.g. `SELECT 1 > ANY (ARRAY[0,1])`
(PostgreSQL example)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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]