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/02/21 03:56:48 UTC
[GitHub] [spark] LuciferYang opened a new pull request #35589: [SPARK-38267][SQL] Replace pattern matches on boolean expressions with conditional statements
LuciferYang opened a new pull request #35589:
URL: https://github.com/apache/spark/pull/35589
### What changes were proposed in this pull request?
This pr uses `conditional statements` to simplify `pattern matches on boolean`:
**Before**
```scala
val bool: Boolean
bool match {
case true => do something when bool is true
case false => do something when bool is false
}
```
**After**
```scala
val bool: Boolean
if (bool) {
do something when bool is true
} else {
do something when bool is false
}
```
### Why are the changes needed?
Simplify unnecessary pattern match.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Pass GA
--
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] srowen commented on pull request #35589: [SPARK-38267][CORE][SQL][SS] Replace pattern matches on boolean expressions with conditional statements
Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #35589:
URL: https://github.com/apache/spark/pull/35589#issuecomment-1059972904
It's minor but I do tend to agree this use of match is strictly less readable.
--
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] srowen closed pull request #35589: [SPARK-38267][CORE][SQL][SS] Replace pattern matches on boolean expressions with conditional statements
Posted by GitBox <gi...@apache.org>.
srowen closed pull request #35589:
URL: https://github.com/apache/spark/pull/35589
--
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] srowen commented on pull request #35589: [SPARK-38267][CORE][SQL][SS] Replace pattern matches on boolean expressions with conditional statements
Posted by GitBox <gi...@apache.org>.
srowen commented on pull request #35589:
URL: https://github.com/apache/spark/pull/35589#issuecomment-1060098943
Merged to master
--
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] LuciferYang commented on pull request #35589: [SPARK-38267][CORE][SQL][SS] Replace pattern matches on boolean expressions with conditional statements
Posted by GitBox <gi...@apache.org>.
LuciferYang commented on pull request #35589:
URL: https://github.com/apache/spark/pull/35589#issuecomment-1060137772
thanks @srowen
--
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] LuciferYang commented on pull request #35589: [SPARK-38267][CORE][SQL][SS] Replace pattern matches on boolean expressions with conditional statements
Posted by GitBox <gi...@apache.org>.
LuciferYang commented on pull request #35589:
URL: https://github.com/apache/spark/pull/35589#issuecomment-1059976474
That's all
--
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