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

[TESTS] Replace 'abc & Symbol("abc") symbols with $"abc" in tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.2.1
    • 3.4.0
    • Tests
    • None

    Description

      This ticket is a follow up of SPARK-38351.

       

      When building with Scala 2.13 many test classes produce warnings like:

      [warn] /home/runner/work/spark/spark/sql/core/src/test/scala/org/apache/spark/sql/execution/BaseScriptTransformationSuite.scala:562:11: [deprecation @  | origin= | version=2.13.0] symbol literal is deprecated; use Symbol("d") instead
      [warn]           'd.cast("string"),
      [warn]           ^
      [warn] /home/runner/work/spark/spark/sql/core/src/test/scala/org/apache/spark/sql/execution/BaseScriptTransformationSuite.scala:563:11: [deprecation @  | origin= | version=2.13.0] symbol literal is deprecated; use Symbol("e") instead
      [warn]           'e.cast("string")).collect())
       

      For easier migration to Scala 3.x later it would be good to fix this warnings!

       

      Also as suggested by https://github.com/HeartSaVioR it would be good to use Spark's $"abc" syntax for columns.

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              mgrigorov Martin Tzvetanov Grigorov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: