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

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 2.4.8, 3.0.2, 3.1.1
    • Documentation
    • 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

            yuningzh Yuning Zhang
            yuningzh Yuning Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: