Github user cenyuhai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17362#discussion_r107828225
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala ---
    @@ -135,6 +142,35 @@ private[sql] class HiveSessionCatalog(
         }
       }
     
    +  override def loadFunctionResources(resources: Seq[FunctionResource]): 
Unit = {
    +    logDebug("loading hive permanent function resources")
    +    resources.foreach { resource =>
    +      val resourceType = resource.resourceType match {
    +        case JarResource =>
    +          ResourceType.JAR
    +        case FileResource =>
    +          ResourceType.FILE
    +        case ArchiveResource =>
    +          ResourceType.ARCHIVE
    +      }
    +      val uri = if (!Shell.WINDOWS) {
    +        new URI(resource.uri)
    +      }
    +      else {
    +        new Path(resource.uri).toUri
    +      }
    +      val scheme = if (uri.getScheme == null) null else 
uri.getScheme.toLowerCase
    +      if (scheme == null || scheme == "file") {
    +        functionResourceLoader.loadResource(resource)
    +      } else {
    +        val sessionState = SessionState.get()
    +        val localPath = sessionState.add_resource(resourceType, 
resource.uri)
    --- End diff --
    
    no, I just use sessionState.add_resource to download the resouces


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to