This is an automated email from the ASF dual-hosted git repository. dongjoon pushed a commit to branch branch-3.4 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.4 by this push: new 4dd2ef95af8 [SPARK-42410][CONNECT][TESTS][FOLLOWUP] Fix `PlanGenerationTestSuite` together 4dd2ef95af8 is described below commit 4dd2ef95af8546a6dc80aa9f1b9dde5513b5d0c9 Author: Dongjoon Hyun <dongj...@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 <dongj...@apache.org> Signed-off-by: Dongjoon Hyun <dongj...@apache.org> (cherry picked from commit f8fda8aa1356b3ac902570e0a5536d9c00838490) Signed-off-by: Dongjoon Hyun <dongj...@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-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org