Github user gatorsmile commented on a diff in the pull request:
    --- Diff: 
    @@ -74,6 +107,31 @@ class RegexpExpressionsSuite extends SparkFunSuite with 
ExpressionEvalHelper {
         checkEvaluation("a\nb" like regEx, true, create_row("a%b"))
         checkEvaluation(Literal.create(null, StringType) like regEx, null, 
    +    checkEvaluation("" like regEx, true, create_row(""))
    +    checkEvaluation("a" like regEx, false, create_row(""))
    +    checkEvaluation("" like regEx, false, create_row("a"))
    +    checkEvaluation("""\\\\""" like regEx, true, create_row("""%\\%"""))
    +    checkEvaluation("""%%""" like regEx, true, create_row("""%%"""))
    +    checkEvaluation("""\__""" like regEx, true, create_row("""\\\__"""))
    +    checkEvaluation("""\\\__""" like regEx, false, 
    +    checkEvaluation("""_\\\%""" like regEx, false, create_row("""%\\"""))
    +    // scalastyle:off nonascii
    +    checkEvaluation("a\u20ACa" like regEx, true, create_row("_\u20AC_"))
    +    checkEvaluation("a€a" like regEx, true, create_row("_€_"))
    +    checkEvaluation("a€a" like regEx, true, create_row("_\u20AC_"))
    +    checkEvaluation("a\u20ACa" like regEx, true, create_row("_€_"))
    +    // scalastyle:on nonascii
    +    // TODO: should throw an exception?
    --- End diff --
    To answer your point 3, I did a try in DB2. 
    db2 => select actkwd from act where actkwd like '%A%\a' escape '\'
    SQL0130N  The ESCAPE clause is not a single character, or the pattern 
    contains an invalid occurrence of the escape character.  SQLSTATE=22025
    In DB2, normally, our design is very conservative. If we think this could 
be a user error, we will stop it with an error. We do not want to give users 
any surprise. 

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 or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to