pan3793 commented on code in PR #43766:
URL: https://github.com/apache/spark/pull/43766#discussion_r1435936724


##########
sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HiveClientSuite.scala:
##########
@@ -501,46 +501,52 @@ class HiveClientSuite(version: String, allVersions: 
Seq[String])
   }
 
   test("dropPartitions") {
-    val spec = Map("key1" -> "1", "key2" -> "3")
-    val versionsWithoutPurge =
-      if (allVersions.contains("1.2")) allVersions.takeWhile(_ != "1.2") else 
Nil
-    // Similar to dropTable; try with purge set, and if it fails, make sure 
we're running
-    // with a version that is older than the minimum (1.2 in this case).
-    try {
-      client.dropPartitions("default", "src_part", Seq(spec), 
ignoreIfNotExists = true,
-        purge = true, retainData = false)
-      assert(!versionsWithoutPurge.contains(version))
-    } catch {
-      case _: UnsupportedOperationException =>
-        assert(versionsWithoutPurge.contains(version))
+    // Since Hive 3.0(HIVE-19383), we can not run `Hive.dropPartitions` with 
JDK 11.
+    if (version != "3.0" && version != "3.1") {
+      val spec = Map("key1" -> "1", "key2" -> "3")
+      val versionsWithoutPurge =
+        if (allVersions.contains("1.2")) allVersions.takeWhile(_ != "1.2") 
else Nil

Review Comment:
   `allVersions.contains("1.2")` is always `false` now since Spark 4.0 only 
supports Hive 2.0.0 and above.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to