Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/12885#discussion_r62150647
--- 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 --
We also need to change the parser and change the interface of
`DescribeFunction` to:
```scala
case class DescribeFunction(
functionName: FunctionIdentifier,
isExtended: Boolean) extends RunnableCommand {
```
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]