MaxGekk commented on a change in pull request #33966:
URL: https://github.com/apache/spark/pull/33966#discussion_r707267326



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala
##########
@@ -1625,9 +1641,10 @@ class AstBuilder extends SqlBaseBaseVisitor[AnyRef] with 
SQLConfHelper with Logg
               }
               str.charAt(0)
             }.getOrElse('\\')
-            val likeExpr = if (ctx.kind.getType == SqlBaseParser.ILIKE) {
-              new ILike(e, expression(ctx.pattern), escapeChar)
-            } else Like(e, expression(ctx.pattern), escapeChar)
+            val likeExpr = ctx.kind.getType match {
+              case SqlBaseParser.ILIKE => new ILike(e, 
expression(ctx.pattern), escapeChar)
+              case _ => Like(e, expression(ctx.pattern), escapeChar)
+            }

Review comment:
       @sigmod I addressed your comment from the previous PR.




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

To unsubscribe, e-mail: [email protected]

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