Skip to content

chore: replace deprecated symbol literals with $"col" in tests - #5168

Merged
andygrove merged 1 commit into
apache:mainfrom
andygrove:chore/symbol-literals
Jul 31, 2026
Merged

chore: replace deprecated symbol literals with $"col" in tests#5168
andygrove merged 1 commit into
apache:mainfrom
andygrove:chore/symbol-literals

Conversation

@andygrove

Copy link
Copy Markdown
Member

Which issue does this PR close?

No issue filed — this is a mechanical compiler-warning cleanup, split out of #5141 because it accounts for the largest single group of warnings on its own.

Rationale for this change

Symbol literals ('col) are deprecated in Scala 2.13. They account for 63 of the 91 Scala warnings in the test sources under the 2.13 profiles — by far the largest single group of Scala compiler warnings in the build, and all of them are in two files. Splitting them out of #5141 keeps that PR reviewable and lets this purely mechanical change go in on its own.

What changes are included in this PR?

'col replaced with the equivalent $"col" string interpolator in:

  • spark/src/test/scala/org/apache/spark/sql/TPCH.scala (62 occurrences — the TPC-H table schema definitions)
  • spark/src/test/scala/org/apache/comet/parquet/ParquetReadSuite.scala (1 occurrence)

No behavior change: both forms resolve through the same Catalyst DSL implicits to the same attribute. Table("region", ...) is reformatted onto multiple lines by spotless because the longer names push it past the line limit — that is the only non-substitution change.

These are the last symbol literals in the repo, so this group of warnings drops to zero.

How are these changes tested?

No new tests — mechanical cleanup with no intended behavior change.

  • Test sources warning count under the default profile (Spark 4.1 / Scala 2.13): 91 → 28, with all 63 symbol-literal warnings gone.
  • test-compile succeeds on the default profile, -Pspark-3.5, and -Pspark-3.4.
  • spotless:check and scalastyle:check pass.
  • Relying on CI to run the affected suites.

Symbol literals ('col) are deprecated in Scala 2.13 and produce 63
compiler warnings under the Scala 2.13 profiles, which is by far the
largest single group of Scala warnings in the build. Replace them with
the equivalent $"col" string interpolator in TPCH.scala and
ParquetReadSuite.

No behavior change: both forms resolve through the same catalyst DSL
implicits to the same attribute.
andygrove added a commit to andygrove/datafusion-comet that referenced this pull request Jul 31, 2026
The symbol literal ('col -> $"col") replacements in TPCH.scala and
ParquetReadSuite accounted for 63 of the warnings fixed here, which is
large enough to review on its own. They are now in apache#5168, so revert
those two files back to main to avoid overlapping with that PR.

@mbutrovich mbutrovich left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @andygrove!

@andygrove
andygrove merged commit dba2ce4 into apache:main Jul 31, 2026
52 checks passed
@andygrove
andygrove deleted the chore/symbol-literals branch July 31, 2026 15:34
andygrove added a commit to andygrove/datafusion-comet that referenced this pull request Jul 31, 2026
The .toIterable protobuf builder fixes and the auto-application-to-()
fixes were split out into apache#5173 and apache#5175. Remove them here so this PR
is limited to the one-off warnings that have no category PR of their
own. apache#5168 and apache#5170 already landed on main.

[skip ci]
andygrove added a commit to andygrove/datafusion-comet that referenced this pull request Jul 31, 2026
The .toIterable protobuf builder fixes and the auto-application-to-()
fixes were split out into apache#5173 and apache#5175. Remove them here so this PR
is limited to the one-off warnings that have no category PR of their
own. apache#5168 and apache#5170 already landed on main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants