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

    https://github.com/apache/spark/pull/12128#discussion_r58465327
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/command/commands.scala 
---
    @@ -438,20 +438,38 @@ case class DescribeFunction(
       }
     
       override def run(sqlContext: SQLContext): Seq[Row] = {
    -    sqlContext.sessionState.functionRegistry.lookupFunction(functionName) 
match {
    -      case Some(info) =>
    -        val result =
    -          Row(s"Function: ${info.getName}") ::
    -          Row(s"Class: ${info.getClassName}") ::
    -          Row(s"Usage: ${replaceFunctionName(info.getUsage(), 
info.getName)}") :: Nil
    -
    -        if (isExtended) {
    -          result :+ Row(s"Extended 
Usage:\n${replaceFunctionName(info.getExtended, info.getName)}")
    -        } else {
    -          result
    -        }
    +    // Hard code "<>", "!=", "between", and "case" for now as there is no 
corresponding functions.
    +    functionName match {
    +      case "<>" =>
    +        Row(s"Function: $functionName") ::
    +        Row(s"Usage: a <> b - Returns TRUE if a is not equal to b") :: Nil
    +      case "!=" =>
    +        Row(s"Function: $functionName") ::
    +        Row(s"Usage: a != b - Returns TRUE if a is not equal to b") :: Nil
    +      case "between" =>
    +        Row(s"Function: $functionName") ::
    +        Row(s"Usage: between a [NOT] BETWEEN b AND c - " +
    +          s"evaluate if a is [not] in between b and c") :: Nil
    +      case "case" =>
    --- End diff --
    
    Looks like we also need to match upper case letters?


---
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]

Reply via email to