diff options
author | Dongjoon Hyun <dongjoon@apache.org> | 2016-04-10 11:46:45 -0700 |
---|---|---|
committer | Yin Huai <yhuai@databricks.com> | 2016-04-10 11:46:45 -0700 |
commit | a7ce473bd0520c71154ed028f295dab64a7485fe (patch) | |
tree | a4eb37c52e78c14136c859083444a6e9a4ed0708 /R/pkg | |
parent | b5c785629acb9afa5a62de3da472ec2184a31e3d (diff) | |
download | spark-a7ce473bd0520c71154ed028f295dab64a7485fe.tar.gz spark-a7ce473bd0520c71154ed028f295dab64a7485fe.tar.bz2 spark-a7ce473bd0520c71154ed028f295dab64a7485fe.zip |
[SPARK-14415][SQL] All functions should show usages by command `DESC FUNCTION`
## What changes were proposed in this pull request?
Currently, many functions do now show usages like the followings.
```
scala> sql("desc function extended `sin`").collect().foreach(println)
[Function: sin]
[Class: org.apache.spark.sql.catalyst.expressions.Sin]
[Usage: To be added.]
[Extended Usage:
To be added.]
```
This PR adds descriptions for functions and adds a testcase prevent adding function without usage.
```
scala> sql("desc function extended `sin`").collect().foreach(println);
[Function: sin]
[Class: org.apache.spark.sql.catalyst.expressions.Sin]
[Usage: sin(x) - Returns the sine of x.]
[Extended Usage:
> SELECT sin(0);
0.0]
```
The only exceptions are `cube`, `grouping`, `grouping_id`, `rollup`, `window`.
## How was this patch tested?
Pass the Jenkins tests (including new testcases.)
Author: Dongjoon Hyun <dongjoon@apache.org>
Closes #12185 from dongjoon-hyun/SPARK-14415.
Diffstat (limited to 'R/pkg')
0 files changed, 0 insertions, 0 deletions