You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/05/25 08:10:11 UTC
[GitHub] [spark] LucaCanali opened a new pull request, #36662: [SPARK-39286][DOC] Update documentation for the decode function
LucaCanali opened a new pull request, #36662:
URL: https://github.com/apache/spark/pull/36662
### 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
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] MaxGekk commented on pull request #36662: [SPARK-39286][DOC] Update documentation for the decode function
Posted by GitBox <gi...@apache.org>.
MaxGekk commented on PR #36662:
URL: https://github.com/apache/spark/pull/36662#issuecomment-1146765074
@beliefer @cloud-fan Please, take a look at this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on a diff in pull request #36662: [SPARK-39286][DOC] Update documentation for the decode function
Posted by GitBox <gi...@apache.org>.
beliefer commented on code in PR #36662:
URL: https://github.com/apache/spark/pull/36662#discussion_r889782405
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -2504,9 +2504,10 @@ object Decode {
usage = """
_FUNC_(bin, charset) - Decodes the first argument using the second argument character set.
- _FUNC_(expr, search, result [, search, result ] ... [, default]) - Decode compares expr
- to each search value one by one. If expr is equal to a search, returns the corresponding result.
- If no match is found, then Oracle returns default. If default is omitted, returns null.
+ _FUNC_(expr, search, result [, search, result ] ... [, default]) - Compares expr
+ to each search value in order. If expr is equal to a search value, _FUNC_ returns
+ the corresponding result. If no match is found, then it returns default. If default
Review Comment:
```suggestion
the corresponding result. If no match is found, returns default. If default
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -2504,9 +2504,10 @@ object Decode {
usage = """
_FUNC_(bin, charset) - Decodes the first argument using the second argument character set.
- _FUNC_(expr, search, result [, search, result ] ... [, default]) - Decode compares expr
- to each search value one by one. If expr is equal to a search, returns the corresponding result.
- If no match is found, then Oracle returns default. If default is omitted, returns null.
+ _FUNC_(expr, search, result [, search, result ] ... [, default]) - Compares expr
+ to each search value in order. If expr is equal to a search value, _FUNC_ returns
Review Comment:
```suggestion
to each search value in order. If expr is equal to a search value, returns
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on a diff in pull request #36662: [SPARK-39286][DOC] Update documentation for the decode function
Posted by GitBox <gi...@apache.org>.
beliefer commented on code in PR #36662:
URL: https://github.com/apache/spark/pull/36662#discussion_r890691547
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -2504,9 +2504,10 @@ object Decode {
usage = """
_FUNC_(bin, charset) - Decodes the first argument using the second argument character set.
- _FUNC_(expr, search, result [, search, result ] ... [, default]) - Decode compares expr
- to each search value one by one. If expr is equal to a search, returns the corresponding result.
- If no match is found, then Oracle returns default. If default is omitted, returns null.
+ _FUNC_(expr, search, result [, search, result ] ... [, default]) - Compares expr
+ to each search value in order. If expr is equal to a search value, _FUNC_ returns
Review Comment:
I got it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] AmplabJenkins commented on pull request #36662: [SPARK-39286][DOC] Update documentation for the decode function
Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on PR #36662:
URL: https://github.com/apache/spark/pull/36662#issuecomment-1137841013
Can one of the admins verify this patch?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] beliefer commented on a diff in pull request #36662: [SPARK-39286][DOC] Update documentation for the decode function
Posted by GitBox <gi...@apache.org>.
beliefer commented on code in PR #36662:
URL: https://github.com/apache/spark/pull/36662#discussion_r890692975
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -2504,9 +2504,10 @@ object Decode {
usage = """
_FUNC_(bin, charset) - Decodes the first argument using the second argument character set.
- _FUNC_(expr, search, result [, search, result ] ... [, default]) - Decode compares expr
- to each search value one by one. If expr is equal to a search, returns the corresponding result.
- If no match is found, then Oracle returns default. If default is omitted, returns null.
+ _FUNC_(expr, search, result [, search, result ] ... [, default]) - Compares expr
+ to each search value in order. If expr is equal to a search value, _FUNC_ returns
+ the corresponding result. If no match is found, then it returns default. If default
Review Comment:
I just want simplify the comment. The comment is OK too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on pull request #36662: [SPARK-39286][DOC] Update documentation for the decode function
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on PR #36662:
URL: https://github.com/apache/spark/pull/36662#issuecomment-1148337126
thanks, merging to master/3.3!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan commented on a diff in pull request #36662: [SPARK-39286][DOC] Update documentation for the decode function
Posted by GitBox <gi...@apache.org>.
cloud-fan commented on code in PR #36662:
URL: https://github.com/apache/spark/pull/36662#discussion_r890191027
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -2504,9 +2504,10 @@ object Decode {
usage = """
_FUNC_(bin, charset) - Decodes the first argument using the second argument character set.
- _FUNC_(expr, search, result [, search, result ] ... [, default]) - Decode compares expr
- to each search value one by one. If expr is equal to a search, returns the corresponding result.
- If no match is found, then Oracle returns default. If default is omitted, returns null.
+ _FUNC_(expr, search, result [, search, result ] ... [, default]) - Compares expr
+ to each search value in order. If expr is equal to a search value, _FUNC_ returns
Review Comment:
`_FUNC_` is a placeholder and will be replaced by the real function name in the doc page. I think this is fine?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] LucaCanali commented on a diff in pull request #36662: [SPARK-39286][DOC] Update documentation for the decode function
Posted by GitBox <gi...@apache.org>.
LucaCanali commented on code in PR #36662:
URL: https://github.com/apache/spark/pull/36662#discussion_r890493367
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -2504,9 +2504,10 @@ object Decode {
usage = """
_FUNC_(bin, charset) - Decodes the first argument using the second argument character set.
- _FUNC_(expr, search, result [, search, result ] ... [, default]) - Decode compares expr
- to each search value one by one. If expr is equal to a search, returns the corresponding result.
- If no match is found, then Oracle returns default. If default is omitted, returns null.
+ _FUNC_(expr, search, result [, search, result ] ... [, default]) - Compares expr
+ to each search value in order. If expr is equal to a search value, _FUNC_ returns
Review Comment:
I believe it should be fine as @cloud-fan commented.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] LucaCanali commented on a diff in pull request #36662: [SPARK-39286][DOC] Update documentation for the decode function
Posted by GitBox <gi...@apache.org>.
LucaCanali commented on code in PR #36662:
URL: https://github.com/apache/spark/pull/36662#discussion_r890504556
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala:
##########
@@ -2504,9 +2504,10 @@ object Decode {
usage = """
_FUNC_(bin, charset) - Decodes the first argument using the second argument character set.
- _FUNC_(expr, search, result [, search, result ] ... [, default]) - Decode compares expr
- to each search value one by one. If expr is equal to a search, returns the corresponding result.
- If no match is found, then Oracle returns default. If default is omitted, returns null.
+ _FUNC_(expr, search, result [, search, result ] ... [, default]) - Compares expr
+ to each search value in order. If expr is equal to a search value, _FUNC_ returns
+ the corresponding result. If no match is found, then it returns default. If default
Review Comment:
I believe "returns" needs a subject to complete the sentence. One option is to have "it" as proposed, other options are possible , for example repeating _FUNC_ , or more options I guess.
The proposed change of just using "returns default", is quite understandable, although strictly speaking is missing the subject.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] [spark] cloud-fan closed pull request #36662: [SPARK-39286][DOC] Update documentation for the decode function
Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #36662: [SPARK-39286][DOC] Update documentation for the decode function
URL: https://github.com/apache/spark/pull/36662
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org