You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/07/12 08:54:04 UTC
[GitHub] [spark] cloud-fan commented on a diff in pull request #37154: [SPARK-39744][SQL] Add the `REGEXP_INSTR` function
cloud-fan commented on code in PR #37154:
URL: https://github.com/apache/spark/pull/37154#discussion_r918719734
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala:
##########
@@ -1043,3 +1043,89 @@ case class RegExpSubStr(left: Expression, right: Expression)
newChildren: IndexedSeq[Expression]): RegExpSubStr =
copy(left = newChildren(0), right = newChildren(1))
}
+
+// scalastyle:off line.size.limit
+@ExpressionDescription(
+ usage = """
+ _FUNC_(str, regexp) - Searches a string for a regular expression and returns an integer that indicates the beginning position matched substring. Positions are 1-based, not 0-based. If no match is found, returns 0.
Review Comment:
```suggestion
_FUNC_(str, regexp) - Searches a string for a regular expression and returns an integer that indicates the beginning position of the matched substring. Positions are 1-based, not 0-based. If no match is found, returns 0.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org