Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-44111 Prepare Apache Spark 4.0.0
  3. SPARK-46998

Deprecate `spark.sql.legacy.allowZeroIndexInFormatString`

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0
    • SQL

    Description

      The SQL config spark.sql.legacy.allowZeroIndexInFormatString doesn't allow to use the zero index. Even set it to true, users get the error:

      > select format_string('%0$s', 'Hello');
      
      Illegal format argument index = 0
      java.util.IllegalFormatArgumentIndexException: Illegal format argument index = 0
      	at java.base/java.util.Formatter$FormatSpecifier.index(Formatter.java:2808)
      	at java.base/java.util.Formatter$FormatSpecifier.<init>(Formatter.java:2879)
      

      Attachments

        Issue Links

          Activity

            People

              maxgekk Max Gekk
              maxgekk Max Gekk
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: