This is an automated email from the ASF dual-hosted git repository. ruifengz 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 a5cf0189a9f [SPARK-41818][SPARK-42000][CONNECT][FOLLOWUP] Fix leaked test case a5cf0189a9f is described below commit a5cf0189a9fcf54a57aed1305b09523784166c0c Author: ulysses-you <ulyssesyo...@gmail.com> AuthorDate: Tue Feb 14 15:38:12 2023 +0800 [SPARK-41818][SPARK-42000][CONNECT][FOLLOWUP] Fix leaked test case ### What changes were proposed in this pull request? After https://github.com/apache/spark/pull/40000, the connect framework make format as optional but miss updating some test case. ### Why are the changes needed? recover CI <img width="1052" alt="image" src="https://user-images.githubusercontent.com/12025282/218662255-fd8de2f9-f64e-43c6-8e19-0f2268882b44.png"> ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? pass CI Closes #40006 from ulysses-you/followup. Authored-by: ulysses-you <ulyssesyo...@gmail.com> Signed-off-by: Ruifeng Zheng <ruife...@apache.org> --- .../spark/sql/connect/planner/SparkConnectProtoSuite.scala | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectProtoSuite.scala b/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectProtoSuite.scala index 87117801eb7..ca087f357cb 100644 --- a/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectProtoSuite.scala +++ b/connector/connect/server/src/test/scala/org/apache/spark/sql/connect/planner/SparkConnectProtoSuite.scala @@ -593,6 +593,12 @@ class SparkConnectProtoSuite extends PlanTest with SparkConnectPlanTest { transform(cmd) assert(Files.exists(Paths.get(f.getPath)), s"Output file must exist: ${f.getPath}") } + + // should work if format is not set + withTempPath { f => + transform(localRelation.write(path = Some(f.getCanonicalPath))) + assert(Files.exists(Paths.get(f.getPath)), s"Output file must exist: ${f.getPath}") + } } test("Write to Path with invalid input") { @@ -600,10 +606,6 @@ class SparkConnectProtoSuite extends PlanTest with SparkConnectPlanTest { assertThrows[SparkClassNotFoundException]( transform( localRelation.write(path = Some("/tmp/tmppath"), format = Some("ThisAintNoFormat")))) - - // Default data source not found. - assertThrows[SparkClassNotFoundException]( - transform(localRelation.write(path = Some("/tmp/tmppath")))) } test("Write with sortBy") { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org