You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2023/02/13 02:58:06 UTC
[spark] branch master updated: [SPARK-42410][CONNECT][TESTS][FOLLOWUP] Fix `PlanGenerationTestSuite` together
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 f8fda8aa135 [SPARK-42410][CONNECT][TESTS][FOLLOWUP] Fix `PlanGenerationTestSuite` together
f8fda8aa135 is described below
commit f8fda8aa1356b3ac902570e0a5536d9c00838490
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Sun Feb 12 18:57:52 2023 -0800
[SPARK-42410][CONNECT][TESTS][FOLLOWUP] Fix `PlanGenerationTestSuite` together
### What changes were proposed in this pull request?
This is a follow-up of #39982 to fix `PlanGenerationTestSuite` together.
### Why are the changes needed?
SPARK-42377 added two test suites originally which fails at Scala 2.13, but SPARK-42410 missed `PlanGenerationTestSuite ` while fixing `ProtoToParsedPlanTestSuite`.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Pass the CIs.
```
$ dev/change-scala-version.sh 2.13
$ build/sbt "connect-client-jvm/testOnly org.apache.spark.sql.PlanGenerationTestSuite" -Pscala-2.13
[info] PlanGenerationTestSuite:
...
[info] - function udf 2.13 (514 milliseconds)
...
$ SPARK_GENERATE_GOLDEN_FILES=1 build/sbt "connect-client-jvm/testOnly org.apache.spark.sql.PlanGenerationTestSuite" -Pscala-2.13
...
[info] PlanGenerationTestSuite:
...
[info] - function udf 2.13 (574 milliseconds)
```
Closes #39986 from dongjoon-hyun/SPARK-42410-2.
Authored-by: Dongjoon Hyun <do...@apache.org>
Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
.../test/scala/org/apache/spark/sql/PlanGenerationTestSuite.scala | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/PlanGenerationTestSuite.scala b/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/PlanGenerationTestSuite.scala
index a15539afaa4..494c497c553 100644
--- a/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/PlanGenerationTestSuite.scala
+++ b/connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/PlanGenerationTestSuite.scala
@@ -20,6 +20,7 @@ import java.nio.file.{Files, Path}
import scala.collection.mutable
import scala.util.{Failure, Success, Try}
+import scala.util.Properties.versionNumberString
import com.google.protobuf.util.JsonFormat
import io.grpc.inprocess.InProcessChannelBuilder
@@ -57,6 +58,8 @@ class PlanGenerationTestSuite extends ConnectFunSuite with BeforeAndAfterAll wit
// Borrowed from SparkFunSuite
private val regenerateGoldenFiles: Boolean = System.getenv("SPARK_GENERATE_GOLDEN_FILES") == "1"
+ private val scala = versionNumberString.substring(0, versionNumberString.indexOf(".", 2))
+
// Borrowed from SparkFunSuite
private def getWorkspaceFilePath(first: String, more: String*): Path = {
if (!(sys.props.contains("spark.test.home") || sys.env.contains("SPARK_HOME"))) {
@@ -209,7 +212,7 @@ class PlanGenerationTestSuite extends ConnectFunSuite with BeforeAndAfterAll wit
select(fn.col("id"))
}
- test("function udf") {
+ test("function udf " + scala) {
// This test might be a bit tricky if different JVM
// versions are used to generate the golden files.
val functions = Seq(
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org