This is an automated email from the ASF dual-hosted git repository. gurwls223 pushed a commit to branch branch-3.3 in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.3 by this push: new 4177626e634 [SPARK-35320][SQL][FOLLOWUP] Remove duplicated test 4177626e634 is described below commit 4177626e634cbb0ee446fe042a4a6201b9d8531e Author: itholic <haejoon....@databricks.com> AuthorDate: Tue May 3 19:28:02 2022 +0900 [SPARK-35320][SQL][FOLLOWUP] Remove duplicated test ### What changes were proposed in this pull request? Follow-up for https://github.com/apache/spark/pull/33525 to remove duplicated test. ### Why are the changes needed? We don't need to do the same test twice. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? This patch remove the duplicated test, so the existing test should pass. Closes #36436 from itholic/SPARK-35320. Authored-by: itholic <haejoon....@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> (cherry picked from commit a1ac5c57c7b79fb70656638d284b77dfc4261d35) Signed-off-by: Hyukjin Kwon <gurwls...@apache.org> --- .../src/test/scala/org/apache/spark/sql/JsonFunctionsSuite.scala | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sql/core/src/test/scala/org/apache/spark/sql/JsonFunctionsSuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/JsonFunctionsSuite.scala index c86e1f6e297..1c6bbc5a09d 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/JsonFunctionsSuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/JsonFunctionsSuite.scala @@ -391,14 +391,10 @@ class JsonFunctionsSuite extends QueryTest with SharedSparkSession { test("SPARK-24027: from_json of a map with unsupported key type") { val schema = MapType(StructType(StructField("f", IntegerType) :: Nil), StringType) val startMsg = "cannot resolve 'entries' due to data type mismatch:" - val exception1 = intercept[AnalysisException] { + val exception = intercept[AnalysisException] { Seq("""{{"f": 1}: "a"}""").toDS().select(from_json($"value", schema)) }.getMessage - assert(exception1.contains(startMsg)) - val exception2 = intercept[AnalysisException] { - Seq("""{{"f": 1}: "a"}""").toDS().select(from_json($"value", schema)) - }.getMessage - assert(exception2.contains(startMsg)) + assert(exception.contains(startMsg)) } test("SPARK-24709: infers schemas of json strings and pass them to from_json") { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org