wangyum commented on a change in pull request #25690: 
[SPARK-27831][FOLLOW-UP][SQL][TEST] Move Hive test jars to local file
URL: https://github.com/apache/spark/pull/25690#discussion_r322523094
 
 

 ##########
 File path: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/test/TestHive.scala
 ##########
 @@ -647,3 +648,18 @@ private[sql] class TestHiveSessionStateBuilder(
 
   override protected def newBuilder: NewBuilder = new 
TestHiveSessionStateBuilder(_, _)
 }
+
+private[hive] object HiveTestJars {
+  def getHiveContribJar: File = getJarFile("org.apache.hive:hive-contrib")
+  def getHiveHcatalogCoreJar: File = 
getJarFile("org.apache.hive.hcatalog:hive-hcatalog-core")
+
+  private def getJarFile(coordinate: String): File = {
+    // isTransitive = false: Only direct dependencies should be resolved
+    val filePath = SparkSubmitUtils.resolveMavenCoordinates(
+      s"$coordinate:${HiveUtils.builtinHiveVersion}",
+      SparkSubmitUtils.buildIvySettings(
+        Some("https://repository.apache.org/content/repositories/releases";), 
None),
+      isTransitive = false)
+    new File(filePath)
+  }
 
 Review comment:
   Done

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to