Skip to content

Commit 5c1e0d0

Browse files
yaooqinnHyukjinKwon
authored andcommitted
[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 #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 <[email protected]> Signed-off-by: HyukjinKwon <[email protected]> (cherry picked from commit 3b57921) Signed-off-by: HyukjinKwon <[email protected]>
1 parent 14ab957 commit 5c1e0d0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/ExpressionDescription.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@
7979
* </code>
8080
* </pre>
8181
*
82-
* We can refer the function name by `_FUNC_`, in `usage()`, `arguments()` and `examples()` as
83-
* it is registered in `FunctionRegistry`.
82+
* We can refer the function name by `_FUNC_`, in `usage()`, `arguments()`, `examples()` and
83+
* `note()` as it is registered in `FunctionRegistry`.
8484
*
8585
* Note that, if `extended()` is defined, `arguments()`, `examples()`, `note()`, `group()`,
8686
* `since()` and `deprecated()` should be not defined together. `extended()` exists

sql/gen-sql-api-docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def _list_function_infos(jvm):
4343
usage=usage,
4444
arguments=jinfo.getArguments().replace("_FUNC_", name),
4545
examples=jinfo.getExamples().replace("_FUNC_", name),
46-
note=jinfo.getNote(),
46+
note=jinfo.getNote().replace("_FUNC_", name),
4747
since=jinfo.getSince(),
4848
deprecated=jinfo.getDeprecated()))
4949
return sorted(infos, key=lambda i: i.name)

0 commit comments

Comments
 (0)