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

    https://github.com/apache/spark/pull/22227#discussion_r213176423
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/regexpExpressions.scala
 ---
    @@ -232,30 +232,49 @@ case class RLike(left: Expression, right: Expression) 
extends StringRegexExpress
      * Splits str around pat (pattern is a regular expression).
      */
     @ExpressionDescription(
    -  usage = "_FUNC_(str, regex) - Splits `str` around occurrences that match 
`regex`.",
    +  usage = "_FUNC_(str, regex, limit) - Splits `str` around occurrences 
that match `regex`." +
    +    "The `limit` parameter controls the number of times the pattern is 
applied. If the limit " +
    +    "n is greater than zero then the pattern will be applied at most n - 1 
times, " +
    +    "the array's length will be no greater than n, and the array's last 
entry " +
    +    "will contain all input beyond the last matched delimiter. If n is " +
    +    "less than 0, then the pattern will be applied as many times as " +
    +    "possible and the array can have any length. If n is zero then the " +
    +    "pattern will be applied as many times as possible, the array can " +
    +    "have any length, and trailing empty strings will be discarded.",
    --- End diff --
    
    +1 for https://github.com/apache/spark/pull/22227#discussion_r212815685. 
The doc should better be concise.
    
    Can we just move those `limit` specific description into the arguments at 
`limit - a..`? This looks a bit messy.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to