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_r256807239
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala
##########
@@ -179,6 +179,27 @@ class ExpressionParserSuite extends PlanTest {
InSubquery(Seq('a), ListQuery(table("c").select('b))))
}
+ test("any sub-query") {
+ assertEqual(
+ "a > any (select b from c)",
+ AnySubquery(Seq('a), GreaterThan, ListQuery(table("c").select('b))))
+
+ assertEqual(
+ "(a, b, c) != any (select d, e, f from g)",
+ AnySubquery(Seq('a, 'b, 'c),
+ SubqueryPredicate.NotEqualTo,
+ ListQuery(table("g").select('d, 'e, 'f))))
+
+ assertEqual(
+ "(a, b) = any (select c from d)",
+ AnySubquery(Seq('a, 'b), EqualTo, ListQuery(table("d").select('c))))
+
+ assertEqual(
+ "(a) <= any (select b from c)",
+ AnySubquery(Seq('a), LessThanOrEqual, ListQuery(table("c").select('b))))
+
Review comment:
remove this empty line
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]