spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yhuai <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-15108] [SQL] Describe Permanent UDTF
Date Wed, 04 May 2016 23:21:28 GMT
Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12885#discussion_r62130890
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/functions.scala
---
    @@ -129,7 +129,16 @@ case class DescribeFunction(
                 result
               }
     
    -        case None => Seq(Row(s"Function: $functionName not found."))
    +        case None =>
    +          val currentDb = sparkSession.sessionState.catalog.getCurrentDatabase
    +          if (sparkSession.externalCatalog.functionExists(currentDb, functionName)) {
    +            val catalogFunction = sparkSession.externalCatalog.getFunction(currentDb,
functionName)
    +            Row(s"Function: ${catalogFunction.identifier}") ::
    +              Row(s"Class: ${catalogFunction.className}") ::
    +              Row(s"Usage: N/A") :: Nil
    +          } else {
    +            Seq(Row(s"Function: $functionName not found."))
    +          }
    --- End diff --
    
    Looks like we only need to change https://github.com/apache/spark/pull/12885/files#diff-d2a203f08c862bd762e6740c16e972f7R118
to `sparkSession.sessionState.catalog.lookupFunctionInfo`?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message