AngersZhuuuu commented on a change in pull request #27106: [SPARK-30435][DOC] 
Update doc of  Supported Hive Features
URL: https://github.com/apache/spark/pull/27106#discussion_r369922712
 
 

 ##########
 File path: docs/sql-migration-guide.md
 ##########
 @@ -862,10 +863,34 @@ Spark SQL supports the vast majority of Hive features, 
such as:
   * `JOIN`
   * `{LEFT|RIGHT|FULL} OUTER JOIN`
   * `LEFT SEMI JOIN`
+  * `LEFT ANTI JOIN`
   * `CROSS JOIN`
 * Unions
 * Sub-queries
-  * `SELECT col FROM ( SELECT a + b AS col from t1) t2`
+  * Sub-queries in the FROM Clause
+  
+    ```SELECT col FROM (SELECT a + b AS col FROM t1) t2```
+  * Sub-queries in WHERE Clause
+    * Correlated or non-correlated IN and NOT IN statement In Where Clause
+    
+      ```
+      SELECT col FROM t1 WHERE col IN (SELECT a FROM t2 WHERE t1.id = t2.id)
+      SELECT col FROM t1 WHERE col IN (SELECT a FROM t2)
+      ```
+    * Correlated or non-correlated EXISTS and NOT EXISTS statement In Where 
Clause
+    
+      ```
+      SELECT col FROM t1 WHERE EXISTS (SELECT t2.a FROM t2 WHERE t1.id = t2.id 
AND t2.a > 10)
+      SELECT col FROM t1 WHERE EXISTS (SELECT t2.a FROM t2 WHERE t2.a > 10)
+      ```
+    * Non-correlated IN and NOT IN statement in Join Condition
+    
+      ```SELECT a.col1 FROM tbl1 a JOIN tbl2 b ON a.id = b.id AND a.id IN 
(SELECT id FROM tbl3 c)```
+   
+    * Non-correlated EXISTS and NOT EXISTS statement in Join Condition
 
 Review comment:
   > To sum up, we don't support `correlated queries in case of join condition` 
(IN/EXISTS)?
   
   Yea, not supported yet,  there don't have a good way to implement it .

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

Reply via email to