Skip to content

[SPARK-48804][SQL][TESTS][FOLLOWUP] Fix compilation warning adaptation of an empty argument list by inserting () is deprecated#47317

Closed
LuciferYang wants to merge 1 commit intoapache:masterfrom
LuciferYang:SPARK-48804-FOLLOWUP-2
Closed

[SPARK-48804][SQL][TESTS][FOLLOWUP] Fix compilation warning adaptation of an empty argument list by inserting () is deprecated#47317
LuciferYang wants to merge 1 commit intoapache:masterfrom
LuciferYang:SPARK-48804-FOLLOWUP-2

Conversation

@LuciferYang
Copy link
Contributor

What changes were proposed in this pull request?

This pr aims to fix a compilation warning related to Scala 2.11:

[warn] /Users/yangjie01/SourceCode/git/spark-mine-sbt/sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetCommitterSuite.scala:119:77: adaptation of an empty argument list by inserting () is deprecated: this is unlikely to be what you want
[warn]         signature: SQLTestUtilsBase.withSQLConf[T](pairs: (String, String)*)(f: => T): T
[warn]   given arguments: <none>
[warn]  after adaptation: SQLTestUtilsBase.withSQLConf((): Unit)
[warn] Applicable -Wconf / @nowarn filters for this warning: msg=<part of the message>, cat=deprecation, site=org.apache.spark.sql.execution.datasources.parquet.ParquetCommitterSuite, origin=org.apache.spark.sql.test.SQLTestUtilsBase.withSQLConf, version=2.11.0
[warn]         withSQLConf(SQLConf.PARQUET_OUTPUT_COMMITTER_CLASS.key -> committer)()

Why are the changes needed?

Fix compilation warning

Does this PR introduce any user-facing change?

No

How was this patch tested?

Pass GitHub Actions

Was this patch authored or co-authored using generative AI tooling?

No

@github-actions github-actions bot added the SQL label Jul 12, 2024
Seq("invalid", getClass.getName).foreach { committer =>
val e = intercept[IllegalArgumentException] {
withSQLConf(SQLConf.PARQUET_OUTPUT_COMMITTER_CLASS.key -> committer)()
withSQLConf(SQLConf.PARQUET_OUTPUT_COMMITTER_CLASS.key -> committer) {}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@LuciferYang LuciferYang marked this pull request as draft July 15, 2024 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant