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

Fix build warnings for 3.0: postfixOps edition

    XMLWordPrintableJSON

Details

    Description

      I'd like to fix various build warnings showing in the build right now – see the upcoming PR for details as they are varied and small.

      However while fixing warnings about use of postfix notation (i.e. "foo bar" instead of "foo.bar"), I'd like to just remove use of postfix entirely to standardize. They aren't deprecated exactly, but seemed to be frowned upon as usually adding more confusion than clarify (https://contributors.scala-lang.org/t/lets-drop-postfix-operators/1457) and have to be enabled by importing scala.language.postfixOps to avoid warnings.

      I find that use of scalatest postfix syntax doesn't cause warnings, and that's normal usage for scalatest, so will leave that. "0 until n" syntax also doesn't trigger the warnings, it seems. But things like "10 seconds" do, and can be "10.seconds".

      Part of the reason I went ahead in changing that is that we have many instances of things like "120000 milliseconds" in the code, which are simpler as "2.minutes" anyway.

      Attachments

        Issue Links

          Activity

            People

              srowen Sean R. Owen
              srowen Sean R. Owen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: