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/20 05:36:24 UTC

[GitHub] francis0407 opened a new pull request #23783: [SPARK-26854][SQL] Support ANY/SOME subquery

francis0407 opened a new pull request #23783: [SPARK-26854][SQL] Support ANY/SOME subquery
URL: https://github.com/apache/spark/pull/23783
 
 
   ## What changes were proposed in this pull request?
   
   This PR adds `ANY` subquery support in SQL.  
   ANY syntax:
   ``` SQL
   SELECT column(s)
   FROM table
   WHERE column(s) operator ANY 
   (SELECT column(s) FROM table WHERE condition)
   ```
   The implementation is based on `IN` subquery. `IN` subquery can be regarded as a special case of `ANY` subquery whose operator should be "=".  As `IN` subquery will be rewrote as semi/anti join, the only difference between them is that `ANY` subquery should change the `comparisonExpression`.
   This PR adds a new class `SubqueryPredicate`, which can be implemented by `InSubquery`, `AnySubquery` and also `AllSubquery`.
   ## How was this patch tested?
   Added simple unit tests.

----------------------------------------------------------------
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