Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-34268

The Signature for ConcatWs in Spark SQL Docs Is Inconsistent with the Actual Behavior

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 2.4.8, 3.0.2, 3.1.1
    • Component/s: docs
    • Labels:
      None

      Description

      In https://spark.apache.org/docs/latest/api/sql/index.html#concat_ws, the signature of concat_ws is concat_ws(sep, [str | array(str)]+). However, it doesn't actually need any str or array(str) arguments. Only having the sep argument seems to work.

      For example, `select concat_ws("a")` returns an empty string.

      scala> sql("""select concat_ws("a")""").show
      +------------+
      |concat_ws(a)|
      +------------+
      |            |
      +------------+
      

        Attachments

          Activity

            People

            • Assignee:
              yuningzh Yuning Zhang
              Reporter:
              yuningzh Yuning Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: