aboutsummaryrefslogtreecommitdiff
path: root/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala
diff options
context:
space:
mode:
Diffstat (limited to 'sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala')
-rw-r--r--sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala
index d25da3fd58..4147ace511 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala
@@ -68,7 +68,14 @@ trait StringRegexExpression extends ImplicitCastInputTypes {
* Simple RegEx pattern matching function
*/
@ExpressionDescription(
- usage = "str _FUNC_ pattern - Returns true if str matches pattern and false otherwise.")
+ usage = "str _FUNC_ pattern - Returns true if str matches pattern, null if any arguments are null, false otherwise.",
+ extended =
+ "The pattern is a string which is matched literally, with exception to the following symbols:\n" +
+ " _ matches any one character in the input (similar to . in posix regular expressions)\n" +
+ " % matches zero ore more characters in the input (similar to .* in posix regular expressions)\n" +
+ "The default escape character is '\\'. Any character after the escape character will be matched against literally. " +
+ "Ending a pattern in an escape character is invalid and will throw a ?? exception.\n" +
+ "Use RLIKE to match with standard regular expressions.")
case class Like(left: Expression, right: Expression)
extends BinaryExpression with StringRegexExpression {