maropu commented on a change in pull request #27477:
URL: https://github.com/apache/spark/pull/27477#discussion_r413595542
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/ExpressionParserSuite.scala
##########
@@ -208,6 +208,15 @@ class ExpressionParserSuite extends AnalysisTest {
assertEqual("a rlike 'pattern\\t\\n'", 'a rlike "pattern\\t\\n", parser)
}
+ test("(NOT) LIKE (ANY | ALL) expressions") {
+ assertEqual("a like any ('foo%', 'bar%')", ('a like "foo%") || ('a like
"bar%"))
+ assertEqual("a not like any ('foo%', 'bar%')", !('a like "foo%") || !('a
like "bar%"))
+ assertEqual("not (a like any ('foo%', 'bar%'))", !(('a like "foo%") || ('a
like "bar%")))
+ assertEqual("a like all ('foo%', 'bar%')", ('a like "foo%") && ('a like
"bar%"))
+ assertEqual("a not like all ('foo%', 'bar%')", !('a like "foo%") && !('a
like "bar%"))
+ assertEqual("not (a like all ('foo%', 'bar%'))", !(('a like "foo%") && ('a
like "bar%")))
Review comment:
Could you add two more tests for error handling for L1396 and L1422 in
AstBuilder.scala?
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]