You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/11/23 13:37:45 UTC

[GitHub] [spark] wangyum commented on a change in pull request #30465: [SPARK-33045][SQL][FOLLOWUP] Support build-in function like_any and fix StackOverflowError issue.

wangyum commented on a change in pull request #30465:
URL: https://github.com/apache/spark/pull/30465#discussion_r528707927



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -1404,11 +1404,24 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with SQLConfHelper with Logg
       case SqlBaseParser.LIKE =>
         Option(ctx.quantifier).map(_.getType) match {
           case Some(SqlBaseParser.ANY) | Some(SqlBaseParser.SOME) =>
-            getLikeQuantifierExprs(ctx.expression).reduceLeft(Or)
+            validate(!ctx.expression.isEmpty, "Expected something between '(' and ')'.", ctx)

Review comment:
       It seems we do not need empty check in Line#1387 now: https://github.com/apache/spark/pull/30465/files#diff-26fe6b511f4b8aedf5bdffae0d7c03aba69463c09fa4f881d77520125796e0faR1387




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org