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

    https://github.com/apache/spark/pull/17887#discussion_r115801045
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala
 ---
    @@ -144,7 +151,31 @@ case class Like(left: Expression, right: Expression) 
extends StringRegexExpressi
     }
     
     @ExpressionDescription(
    -  usage = "str _FUNC_ regexp - Returns true if `str` matches `regexp`, or 
false otherwise.")
    +  usage = "str _FUNC_ regexp - Returns true if `str` matches `regexp`, or 
false otherwise.",
    +  extended = """
    +    Arguments:
    +      str - a string expression
    +      regexp - a string expression. The pattern string should be a Java 
regular expression.
    +
    +        Since Spark 2.0, string literals (including regex patterns) are 
unescaped in our SQL parser.
    +        For example, if the `str` parameter is "abc\td", the `regexp` can 
match it is:
    +        "^abc\\\\td$".
    +
    +    Examples:
    +      > SELECT '%SystemDrive%\Users\John' _FUNC_ '%SystemDrive%\\Users.*'
    +      true
    +
    +        There is a SQL config 'spark.sql.parser.escapedStringLiterals' can 
be used to fallback
    +        to Spark 1.6 behavior regarding string literal parsing. For 
example, if the config is
    +        enabled, the `regexp` can match "abc\td" is "^abc\\t$".
    --- End diff --
    
    `can match` -> `that can match`


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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to