Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/17887#discussion_r115995239
--- 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 to match "abc\td", a regular expression for
`regexp` can be "^abc\\\\td$".
--- End diff --
OK. Let me change to SQL shell string.
---
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]