cloud-fan commented on a change in pull request #28158: [SPARK-25154][SQL] 
Support NOT IN sub-queries inside nested OR conditions
URL: https://github.com/apache/spark/pull/28158#discussion_r406655034
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/RewriteSubquerySuite.scala
 ##########
 @@ -52,4 +52,21 @@ class RewriteSubquerySuite extends PlanTest {
     comparePlans(optimized, correctAnswer)
   }
 
+  test("NOT-IN subquery nested inside OR") {
+    val relation1 = LocalRelation('a.int, 'b.int)
+    val relation2 = LocalRelation('c.int, 'd.int)
+    val exists = 'exists.boolean.notNull
+
+    val query = relation1.where('b === 1 || 
Not('a.in(ListQuery(relation2.select('c))))).select('a)
+
+    val plan = relation1.select('a).where('b === 1 || Not('exists))
 
 Review comment:
   where do we use `plan`?

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