You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2021/01/28 05:08:17 UTC

[spark] branch branch-2.4 updated: [SPARK-34268][SQL][DOCS] Correct the documentation of the concat_ws function

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

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


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

commit 86eb199a12447e67969e136a7f61a45544c22e5a
Author: Yuming Wang <yu...@ebay.com>
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 <yu...@ebay.com>
    Signed-off-by: HyukjinKwon <gu...@apache.org>
    (cherry picked from commit 01d11da84ef7c3abbfd1072c421505589ac1e9b2)
    Signed-off-by: HyukjinKwon <gu...@apache.org>
---
 .../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 f0c3208..17e368f 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
@@ -45,11 +45,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: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org