This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new 9ab75f65cee6 [MINOR][CONNECT][TESTS] Use `Some(())` instead of
`Some()` for `Option[Unit]` return type
9ab75f65cee6 is described below
commit 9ab75f65cee6548e305d172d6fe79e57d3ce94f6
Author: yangjie01 <[email protected]>
AuthorDate: Sun Nov 12 14:39:59 2023 -0800
[MINOR][CONNECT][TESTS] Use `Some(())` instead of `Some()` for
`Option[Unit]` return type
### What changes were proposed in this pull request?
This pr fix a compile warning like
```
[warn]
/Users/yangjie01/SourceCode/git/spark-mine-sbt/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/plugin/SparkConnectPluginRegistrySuite.scala:95:9:
adaptation of an empty argument list by inserting () is deprecated: this is
unlikely to be what you want
[warn] signature: Some.apply[A](value: A): Some[A]
[warn] given arguments: <none>
[warn] after adaptation: Some((): Unit)
[warn] Applicable -Wconf / nowarn filters for this fatal warning: msg=<part
of the message>, cat=deprecation,
site=org.apache.spark.sql.connect.plugin.ExampleCommandPlugin.process,
origin=scala.Some.apply, version=2.11.0
[warn] Some()
[warn] ^
```
### Why are the changes needed?
Clean up a deprecated usage since Scala 2.11.0
### Does this PR introduce _any_ user-facing change?
No, just for test
### How was this patch tested?
Pass GitHub Action
### Was this patch authored or co-authored using generative AI tooling?
No
Closes #43733 from LuciferYang/minor-option-unit.
Lead-authored-by: yangjie01 <[email protected]>
Co-authored-by: YangJie <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
.../spark/sql/connect/plugin/SparkConnectPluginRegistrySuite.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/plugin/SparkConnectPluginRegistrySuite.scala
b/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/plugin/SparkConnectPluginRegistrySuite.scala
index e1de6b04d211..ded5ca6415b9 100644
---
a/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/plugin/SparkConnectPluginRegistrySuite.scala
+++
b/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/plugin/SparkConnectPluginRegistrySuite.scala
@@ -92,7 +92,7 @@ class ExampleCommandPlugin extends CommandPlugin {
val cmd = command.unpack(classOf[proto.ExamplePluginCommand])
assert(planner.session != null)
SparkContext.getActive.get.setLocalProperty("testingProperty",
cmd.getCustomField)
- Some()
+ Some(())
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]