This is an automated email from the ASF dual-hosted git repository.

gurwls223 pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new d147799  [SPARK-34268][SQL][DOCS] Correct the documentation of the 
concat_ws function
d147799 is described below

commit d1477990064b3b08f4b240fe373c59f57a39259f
Author: Yuming Wang <[email protected]>
AuthorDate: Thu Jan 28 14:06:36 2021 +0900

    [SPARK-34268][SQL][DOCS] Correct the documentation of the concat_ws function
    
    ### What changes were proposed in this pull request?
    
    This pr correct the documentation of the `concat_ws` function.
    
    ### Why are the changes needed?
    
    `concat_ws` doesn't need any str or array(str) arguments:
    ```
    scala> sql("""select concat_ws("s")""").show
    +------------+
    |concat_ws(s)|
    +------------+
    |            |
    +------------+
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    ```
     build/sbt  "sql/testOnly *.ExpressionInfoSuite"
    ```
    
    Closes #31370 from wangyum/SPARK-34268.
    
    Authored-by: Yuming Wang <[email protected]>
    Signed-off-by: HyukjinKwon <[email protected]>
    (cherry picked from commit 01d11da84ef7c3abbfd1072c421505589ac1e9b2)
    Signed-off-by: HyukjinKwon <[email protected]>
---
 .../org/apache/spark/sql/catalyst/expressions/stringExpressions.scala | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
 
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
index 9f92181..37ca8ee 100755
--- 
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
+++ 
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala
@@ -49,11 +49,13 @@ import org.apache.spark.unsafe.types.{ByteArray, UTF8String}
  */
 // scalastyle:off line.size.limit
 @ExpressionDescription(
-  usage = "_FUNC_(sep, [str | array(str)]+) - Returns the concatenation of the 
strings separated by `sep`.",
+  usage = "_FUNC_(sep[, str | array(str)]+) - Returns the concatenation of the 
strings separated by `sep`.",
   examples = """
     Examples:
       > SELECT _FUNC_(' ', 'Spark', 'SQL');
         Spark SQL
+      > SELECT _FUNC_('s');
+
   """,
   since = "1.5.0")
 // scalastyle:on line.size.limit


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to