beliefer commented on a change in pull request #29999:
URL: https://github.com/apache/spark/pull/29999#discussion_r503023523



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -1408,7 +1408,13 @@ class AstBuilder(conf: SQLConf) extends 
SqlBaseBaseVisitor[AnyRef] with Logging
           case Some(SqlBaseParser.ANY) | Some(SqlBaseParser.SOME) =>
             getLikeQuantifierExprs(ctx.expression).reduceLeft(Or)
           case Some(SqlBaseParser.ALL) =>
-            getLikeQuantifierExprs(ctx.expression).reduceLeft(And)
+            if (ctx.expression.isEmpty) {
+              throw new ParseException("Expected something between '(' and 
')'.", ctx)
+            }
+            ctx.NOT match {
+              case null => LikeAll(e, ctx.expression.asScala.map(expression))

Review comment:
       I have improved the implement. It will be converted to `LikeAll` when it 
judges that it will cause `StackOverflowError`, still use the current approach, 
otherwise.




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

Reply via email to