maropu commented on a change in pull request #23783: [SPARK-26854][SQL] Support 
ANY/SOME subquery
URL: https://github.com/apache/spark/pull/23783#discussion_r263347083
 
 

 ##########
 File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisErrorSuite.scala
 ##########
 @@ -604,4 +604,26 @@ class AnalysisErrorSuite extends AnalysisTest {
     assertAnalysisError(plan5,
                         "Accessing outer query column is not allowed in" :: 
Nil)
   }
+
+  test("ANY/SOME predicate doesn't support multi-column comparison") {
+    val a1 = AttributeReference("a1", IntegerType)()
+    val a2 = AttributeReference("a2", IntegerType)()
+    val b1 = AttributeReference("b1", IntegerType)()
+    val b2 = AttributeReference("b2", IntegerType)()
+    val a = LocalRelation(a1, a2)
+    val b = LocalRelation(b1, b2)
+    // a1 > ANY (SELECT b1 FROM b)
+    val plan1 = Filter(
+      AnySubquery(Seq(a1), ListQuery(Project(Seq(b1), b)), GreaterThan), a)
+    assertAnalysisSuccess(plan1)
 
 Review comment:
   We need this test?

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