Skip to content

Change default Scala version to 2.13#18100

Merged
xiangfu0 merged 2 commits intoapache:masterfrom
xiangfu0:codex/scala-2-13-default
Apr 4, 2026
Merged

Change default Scala version to 2.13#18100
xiangfu0 merged 2 commits intoapache:masterfrom
xiangfu0:codex/scala-2-13-default

Conversation

@xiangfu0
Copy link
Copy Markdown
Contributor

@xiangfu0 xiangfu0 commented Apr 4, 2026

Summary

  • switch the default Scala toolchain from 2.12 to 2.13 while keeping -Pscala-2.12 as the fallback
  • make Scala-suffixed Spark/Kafka/chill coordinates follow the selected binary version and refresh LICENSE-binary
  • fix the Spark common test that breaks under Scala 2.13 array equality semantics

Validation

  • ./mvnw -q help:evaluate -Dexpression=scala.version -DforceStdout
  • ./mvnw -q -Pscala-2.12 help:evaluate -Dexpression=scala.version -DforceStdout
  • ./mvnw -pl pinot-connectors/pinot-spark-3-connector -am -DskipTests test-compile
  • ./mvnw -pl pinot-plugins/pinot-stream-ingestion/pinot-kafka-3.0 -am -DskipTests test-compile
  • ./mvnw -Pscala-2.12 -pl pinot-plugins/pinot-input-format/pinot-confluent-json -am -DskipTests test-compile
  • ./mvnw -pl .,pinot-connectors/pinot-spark-common,pinot-connectors/pinot-spark-3-connector,pinot-plugins/pinot-input-format/pinot-confluent-json -DskipTests spotless:apply checkstyle:check license:format license:check

@xiangfu0 xiangfu0 added the dependencies Pull requests that update a dependency file label Apr 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Switches Pinot’s default Scala toolchain from 2.12 to 2.13 while preserving a -Pscala-2.12 fallback, and updates Scala-suffixed dependencies and tests accordingly.

Changes:

  • Set Scala 2.13 as the default (scala.version / scala.compat.version) and keep a scala-2.12 Maven profile for fallback builds.
  • Make Scala-suffixed dependency coordinates (e.g., chill) follow ${scala.compat.version} and refresh LICENSE-binary to match the default Scala 2.13 artifacts.
  • Update Spark common Scala tests to avoid Scala 2.13 array equality pitfalls.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
pom.xml Defaults Scala to 2.13, adds 2.12 fallback profile, and parameterizes Scala-suffixed deps (e.g., chill).
pinot-plugins/pinot-input-format/pinot-confluent-json/pom.xml Clarifies why scala-library test dep remains pinned to Scala 2.13 even under -Pscala-2.12.
pinot-connectors/pinot-spark-common/src/test/scala/org/apache/pinot/connector/spark/common/PinotDataSourceWriteOptionsTest.scala Adjusts assertions to compare arrays via toSeq under Scala 2.13.
pinot-connectors/pinot-spark-common/pom.xml Renames Scala build profile to avoid coupling it to a specific Scala version.
pinot-connectors/pinot-spark-3-connector/pom.xml Renames Scala build profile similarly.
LICENSE-binary Updates listed Scala-suffixed artifacts to the default Scala 2.13 variants.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Apr 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.85%. Comparing base (15b0de3) to head (79261c7).

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #18100   +/-   ##
=========================================
  Coverage     63.85%   63.85%           
  Complexity     1573     1573           
=========================================
  Files          3167     3167           
  Lines        192099   192092    -7     
  Branches      29604    29601    -3     
=========================================
+ Hits         122657   122669   +12     
+ Misses        59788    59768   -20     
- Partials       9654     9655    +1     
Flag Coverage Δ
custom-integration1 100.00% <ø> (ø)
integration 100.00% <ø> (ø)
integration1 100.00% <ø> (ø)
integration2 0.00% <ø> (ø)
java-11 63.83% <ø> (+0.01%) ⬆️
java-21 63.80% <ø> (-0.01%) ⬇️
temurin 63.85% <ø> (+<0.01%) ⬆️
unittests 63.85% <ø> (+<0.01%) ⬆️
unittests1 56.05% <ø> (+0.01%) ⬆️
unittests2 34.28% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xiangfu0 xiangfu0 merged commit 36cdab4 into apache:master Apr 4, 2026
16 checks passed
@xiangfu0 xiangfu0 deleted the codex/scala-2-13-default branch April 4, 2026 23:31
xiangfu0 added a commit to pinot-contrib/pinot-docs that referenced this pull request Apr 5, 2026
@xiangfu0
Copy link
Copy Markdown
Contributor Author

xiangfu0 commented Apr 5, 2026

📝 Documentation update PR: pinot-contrib/pinot-docs#696

This documentation PR updates the Pinot docs to reflect the new default Scala 2.13 version. It includes updates to:

  • Spark Pinot Connector README
  • Kafka Connector Versions documentation
  • Code Setup guide with instructions for building with Scala 2.12 using the -Pscala-2.12 profile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants