[ 
https://issues.apache.org/jira/browse/SPARK-35913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17370416#comment-17370416
 ] 

Apache Spark commented on SPARK-35913:
--------------------------------------

User 'cxzl25' has created a pull request for this issue:
https://github.com/apache/spark/pull/33114

> Create hive permanent function with owner name
> ----------------------------------------------
>
>                 Key: SPARK-35913
>                 URL: https://issues.apache.org/jira/browse/SPARK-35913
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 3.1.2
>            Reporter: dzcxzl
>            Priority: Trivial
>
> Now create a hive permanent function, no owner name, null value
>  
> {code:java}
> private def toHiveFunction(f: CatalogFunction, db: String): HiveFunction = {
>   val resourceUris = f.resources.map { resource =>
>     new ResourceUri(ResourceType.valueOf(
>       resource.resourceType.resourceType.toUpperCase(Locale.ROOT)), 
> resource.uri)
>   }
>   new HiveFunction(
>     f.identifier.funcName,
>     db,
>     f.className,
>     null,
>     PrincipalType.USER,
>     (System.currentTimeMillis / 1000).toInt,
>     FunctionType.JAVA,
>     resourceUris.asJava)
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to