Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/15677#discussion_r85997612
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
---
@@ -407,9 +436,15 @@ case class StringTranslate(srcExpr: Expression,
matchingExpr: Expression, replac
*/
// scalastyle:off line.size.limit
@ExpressionDescription(
- usage = """_FUNC_(str, str_array) - Returns the index (1-based) of the
given string (left) in the comma-delimited list (right).
- Returns 0, if the string wasn't found or if the given string (left)
contains a comma.""",
- extended = "> SELECT _FUNC_('ab','abc,b,ab,c,def');\n 3")
+ usage = """
+ _FUNC_(str, str_array) - Returns the index (1-based) of the given
string (left) in the comma-delimited list (right).
+ Returns 0, if the string was not found or if the given string (left)
contains a comma.
--- End diff --
Instead of using `(left)`/`(right)`, we can directly use the parm names,
just like what we did above.
---
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]