Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15398#discussion_r83349251
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/RegexpExpressionsSuite.scala
 ---
    @@ -54,20 +57,32 @@ class RegexpExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
         checkEvaluation("ab" like "a%b", true)
         checkEvaluation("a\nb" like "a%b", true)
     
    +    //empty input
    +    checkEvaluation("" like "", true)
    +    checkEvaluation("a" like "", false)
    +    checkEvaluation("" like "a", false)
    +
    +
    +    // SI-17647 double-escaping backslash
         checkEvaluation("""\\\\""" like """%\\%""", true) // triple quotes to 
avoid java string escaping
    -    checkEvaluation("""\_%""" like """%\\__""", true)
    -    checkEvaluation("""\_%""" like "%\\\\__", true)
    -    checkEvaluation("""\_%""" like """%\\_%""", true)
    -    checkEvaluation("""\\\\%%""" like """\\%""", true)
    -    checkEvaluation("""\%\""" like """%\%%""", true)
    -    checkEvaluation("\\\n\n%\\" like "\\\\___\\\\", true)
         checkEvaluation("""%%""" like """%%""", true)
         checkEvaluation("""\__""" like """\\\__""", true)
    -
         checkEvaluation("""\\\__""" like """%\\%\%""", false)
    -    checkEvaluation("""\_""" like """\_\_""", false)
         checkEvaluation("""_\\\%""" like """%\\""", false)
    -    checkEvaluation("""_\\__""" like """_\___""", false)
    +
    +    // unicode
    +    checkEvaluation("a\u20ACa" like "_\u20AC_", true)
    +    checkEvaluation("a€a" like "_€_", true)
    --- End diff --
    
    // scalastyle:off
    // non ascii characters are not allowed in the source code, so we disable 
the scalastyle.
    checkEvaluation("a€a" like "_€_", true)
    ...
    // scalastyle:on


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to