You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2020/04/23 04:34:48 UTC
[spark] branch branch-3.0 updated: [SPARK-31474][SQL][FOLLOWUP]
Replace _FUNC_ placeholder with functionname in the note field of
expression info
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 5c1e0d0 [SPARK-31474][SQL][FOLLOWUP] Replace _FUNC_ placeholder with functionname in the note field of expression info
5c1e0d0 is described below
commit 5c1e0d0201f40e16ac25dbc804620656345dc675
Author: Kent Yao <ya...@hotmail.com>
AuthorDate: Thu Apr 23 13:33:04 2020 +0900
[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 <ya...@hotmail.com>
Signed-off-by: HyukjinKwon <gu...@apache.org>
(cherry picked from commit 3b5792114aba211f6dd4a89d91f382672096bce3)
Signed-off-by: HyukjinKwon <gu...@apache.org>
---
.../apache/spark/sql/catalyst/expressions/ExpressionDescription.java | 4 ++--
sql/gen-sql-api-docs.py | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/ExpressionDescription.java b/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/ExpressionDescription.java
index 0f648ab..089fbe5 100644
--- a/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/ExpressionDescription.java
+++ b/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/ExpressionDescription.java
@@ -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
diff --git a/sql/gen-sql-api-docs.py b/sql/gen-sql-api-docs.py
index 3095a51..6132899 100644
--- a/sql/gen-sql-api-docs.py
+++ b/sql/gen-sql-api-docs.py
@@ -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)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org