Skip to content

Conversation

@yew1eb
Copy link
Contributor

@yew1eb yew1eb commented Jan 10, 2026

Which issue does this PR close?

Closes #1870

Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

How was this patch tested?

@github-actions github-actions bot added the build label Jan 10, 2026
@github-actions github-actions bot added the spark label Jan 10, 2026
@yew1eb yew1eb changed the title [AURON #1870][BUILD] Add -Xfatal-warnings and resolve existing -Ywarn-unused warnings [AURON #1870][BUILD] Add -Xfatal-warnings Jan 10, 2026
@yew1eb yew1eb force-pushed the AURON_1870 branch 2 times, most recently from 0fee16e to 5241dec Compare January 10, 2026 10:50
@yew1eb yew1eb force-pushed the AURON_1870 branch 4 times, most recently from 1b3b198 to 7d94322 Compare January 10, 2026 11:23
@yew1eb
Copy link
Contributor Author

yew1eb commented Jan 10, 2026

Depends on #1874

@yew1eb yew1eb marked this pull request as draft January 14, 2026 02:46
@yew1eb yew1eb changed the title [AURON #1870][BUILD] Add -Xfatal-warnings [AURON #1870][BUILD] Add -Xfatal-warnings to scala-maven-plugin and fix related compilation failures Jan 18, 2026
@yew1eb yew1eb marked this pull request as ready for review January 18, 2026 10:52
@yew1eb yew1eb force-pushed the AURON_1870 branch 3 times, most recently from dc63c85 to e62a6d8 Compare January 18, 2026 11:28
…in and fix related compilation failures
Copy link
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

This PR enables stricter Scala compilation by adding the -Xfatal-warnings flag to the scala-maven-plugin, which treats all warnings as errors. The changes also include fixes for various compilation warnings that were exposed by this new setting.

Changes:

  • Added -Xfatal-warnings, -deprecation, and -feature flags to scala-maven-plugin configuration in pom.xml
  • Fixed compilation warnings by adding @nowarn annotations for temporarily unused parameters and deprecation warnings
  • Fixed actual code issues including unused variables, non-exhaustive pattern matches, and deprecated API usage

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pom.xml Added stricter compiler flags (-Xfatal-warnings, -deprecation, -feature) for both base config and Scala 2.13 profile
thirdparty/auron-uniffle/.../AuronUniffleShuffleReader.scala Added @nowarn annotations for temporarily unused parameters
spark-version-annotation-macros/.../sparkver.scala Added @nowarn annotations for macro parameters that appear unused but are used by macro expansion
spark-extension/.../AuronBlockStoreShuffleReaderBase.scala Fixed UnsupportedOperationException to include error message parameter
spark-extension/.../NativeUnionBase.scala Changed wildcard type parameter from _ to Any for type safety
spark-extension/.../NativeShuffledHashJoinBase.scala Made pattern match exhaustive by adding catch-all case that throws IllegalArgumentException
spark-extension/.../NativeShuffleExchangeBase.scala Added @nowarn annotation for temporarily unused parameters
spark-extension/.../NativeParquetSinkBase.scala Replaced deprecated new Job() constructor with Job.getInstance() and added @nowarn for unused parameter
spark-extension/.../AuronArrowColumnVector.scala Added @nowarn annotation for unimplemented placeholder methods
spark-extension/.../Shims.scala Added @nowarn annotation for temporarily unused parameters in default implementation
spark-extension/.../NativeHelper.scala Changed var to val for auronCallNativeWrapper (immutable variable)
spark-extension/.../NativeConverters.scala Removed unused pattern variable names (e to _)
spark-extension/.../AuronConverters.scala Added @nowarn annotations for version-specific methods with unused parameters
spark-extension/.../AuronCallNativeWrapper.scala Added @nowarn annotations for deprecation warnings on JniBridge usage
spark-extension-shims-spark/.../AuronQuerySuite.scala Changed unused expected variables to val _ to explicitly discard values
spark-extension-shims-spark/.../AuronFunctionSuite.scala Removed completely unused variables (dateString, date)
spark-extension-shims-spark/.../NativeShuffledHashJoinExecProvider.scala Added @nowarn annotations for version-specific methods with unused parameters
spark-extension-shims-spark/.../AuronRssShuffleManagerBase.scala Added @nowarn annotation for temporarily unused constructor parameter
spark-extension-shims-spark/.../AuronBlockStoreShuffleReader.scala Added workaround to touch unused parameter for version compatibility
spark-extension-shims-spark/.../ShimsImpl.scala Added @nowarn annotations for version-specific methods with unused parameters
spark-extension-shims-spark/.../InterceptedValidateSparkPlan.scala Added @nowarn annotation for version-specific method with unused parameter
auron-spark-ui/.../AuronSQLAppStatusListener.scala Added @nowarn annotation for temporarily unused constructor parameter
Comments suppressed due to low confidence (2)

spark-extension-shims-spark/src/test/scala/org/apache/auron/AuronQuerySuite.scala:217

  • The computed value is assigned to '_' to explicitly discard it, but this raises the question of whether this code is needed at all. Consider removing this entire if-else expression since neither branch result is used for validation. The actual test validation appears to happen via checkSparkAnswerAndOperator on line 219.
              val _ = if (forcePositionalEvolution) {
                correctAnswer
              } else {
                Seq(Row(null, 2), Row(null, 4), Row(null, 6), Row(null, null))
              }

spark-extension-shims-spark/src/test/scala/org/apache/auron/AuronQuerySuite.scala:254

  • The computed value is assigned to '_' to explicitly discard it, but this raises the question of whether this code is needed at all. Consider removing this entire if-else expression since neither branch result is used for validation. The actual test validation appears to happen via checkSparkAnswerAndOperator on line 256.
              val _ = if (forcePositionalEvolution) {
                correctAnswer
              } else {
                Seq(Row(null, 2, 1), Row(null, 4, 2), Row(null, 6, 3), Row(null, null, 4))
              }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUILD] Add -Xfatal-warnings and resolve existing -Ywarn-unused warnings

1 participant