You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yang Jie (Jira)" <ji...@apache.org> on 2022/03/22 03:08:00 UTC

[jira] [Created] (SPARK-38620) Replace `value.formatted(formatString)` with `formatString.format(value)`

Yang Jie created SPARK-38620:
--------------------------------

             Summary: Replace `value.formatted(formatString)` with `formatString.format(value)`
                 Key: SPARK-38620
                 URL: https://issues.apache.org/jira/browse/SPARK-38620
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 3.4.0
            Reporter: Yang Jie


There are compile warnings as follows:
{code:java}
[WARNING] /spark-source/streaming/src/main/scala/org/apache/spark/streaming/ui/StreamingPage.scala:67: [deprecation @ org.apache.spark.streaming.ui.RecordRateUIData.formattedAvg.$anonfun | origin=scala.Predef.StringFormat.formatted | version=2.12.16] method formatted in class StringFormat is deprecated (since 2.12.16): Use `formatString.format(value)` instead of `value.formatted(formatString)`,
or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.
[WARNING] /spark-source/sql/core/src/main/scala/org/apache/spark/sql/streaming/ui/StreamingQueryPage.scala:201: [deprecation @ org.apache.spark.sql.streaming.ui.StreamingQueryPagedTable.row | origin=scala.Predef.StringFormat.formatted | version=2.12.16] method formatted in class StringFormat is deprecated (since 2.12.16): Use `formatString.format(value)` instead of `value.formatted(formatString)`,
or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.
[WARNING] /spark-source/sql/core/src/main/scala/org/apache/spark/sql/streaming/ui/StreamingQueryPage.scala:202: [deprecation @ org.apache.spark.sql.streaming.ui.StreamingQueryPagedTable.row | origin=scala.Predef.StringFormat.formatted | version=2.12.16] method formatted in class StringFormat is deprecated (since 2.12.16): Use `formatString.format(value)` instead of `value.formatted(formatString)`,
or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters. {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org