[SPARK-31474][SQL][FOLLOWUP] Replace _FUNC_ placeholder with functionname in the note field of expression info

### What changes were proposed in this pull request?

\_FUNC\_ is used in note() of `ExpressionDescription` since https://github.com/apache/spark/pull/28248, it can be more cases later, we should replace it with function name for documentation

### Why are the changes needed?

doc fix

### Does this PR introduce any user-facing change?

no

### How was this patch tested?

pass Jenkins, and verify locally with Jekyll serve

Closes #28305 from yaooqinn/SPARK-31474-F.

Authored-by: Kent Yao <yaooqinn@hotmail.com>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
This commit is contained in:
Kent Yao 2020-04-23 13:33:04 +09:00 committed by HyukjinKwon
parent e7856a7902
commit 3b5792114a
2 changed files with 3 additions and 3 deletions

View file

@ -79,8 +79,8 @@ import java.lang.annotation.RetentionPolicy;
* </code>
* </pre>
*
* We can refer the function name by `_FUNC_`, in `usage()`, `arguments()` and `examples()` as
* it is registered in `FunctionRegistry`.
* We can refer the function name by `_FUNC_`, in `usage()`, `arguments()`, `examples()` and
* `note()` as it is registered in `FunctionRegistry`.
*
* Note that, if `extended()` is defined, `arguments()`, `examples()`, `note()`, `group()`,
* `since()` and `deprecated()` should be not defined together. `extended()` exists

View file

@ -43,7 +43,7 @@ def _list_function_infos(jvm):
usage=usage,
arguments=jinfo.getArguments().replace("_FUNC_", name),
examples=jinfo.getExamples().replace("_FUNC_", name),
note=jinfo.getNote(),
note=jinfo.getNote().replace("_FUNC_", name),
since=jinfo.getSince(),
deprecated=jinfo.getDeprecated()))
return sorted(infos, key=lambda i: i.name)