Skip to content

Commit f4c34aa

Browse files
LucaCanalicloud-fan
authored andcommitted
[SPARK-39286][DOC] Update documentation for the decode function
### What changes were proposed in this pull request? The documentation for the decode function introduced in [SPARK-33527](https://issues.apache.org/jira/browse/SPARK-33527) refers erroneously to Oracle. It appears that the documentation string has been in large parts copied from https://docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/DECODE.html#GUID-39341D91-3442-4730-BD34-D3CF5D4701CE This proposes to update the documentation of the decode function to fix the issue. ### Why are the changes needed? Documentation fix. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? NA Closes apache#36662 from LucaCanali/fixDecodeDoc. Authored-by: Luca Canali <luca.canali@cern.ch> Signed-off-by: Wenchen Fan <wenchen@databricks.com>
1 parent b30a080 commit f4c34aa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2504,9 +2504,10 @@ object Decode {
25042504
usage = """
25052505
_FUNC_(bin, charset) - Decodes the first argument using the second argument character set.
25062506
2507-
_FUNC_(expr, search, result [, search, result ] ... [, default]) - Decode compares expr
2508-
to each search value one by one. If expr is equal to a search, returns the corresponding result.
2509-
If no match is found, then Oracle returns default. If default is omitted, returns null.
2507+
_FUNC_(expr, search, result [, search, result ] ... [, default]) - Compares expr
2508+
to each search value in order. If expr is equal to a search value, _FUNC_ returns
2509+
the corresponding result. If no match is found, then it returns default. If default
2510+
is omitted, it returns null.
25102511
""",
25112512
examples = """
25122513
Examples:

0 commit comments

Comments
 (0)