-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-3010] fix redundant conditional #1992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you really want to trim redundancy, the parens are now unnecessary -- as are the braces and the 'x'. So, you could pare this all the way down to:
val prunedRDD2 = PartitionPruningRDD.create(rdd, _ == 2)|
Something seems to be amiss in this PR: Several of your changes are neither in And some of your changes don't really go all the way toward cleaning up the logic. For example, (aclsEnabled() && (user != null) && (!viewAcls.contains(user))) == falsewould be better as !aclsEnabled || user == null || viewAcls.contains(user) |
|
@markhamstra, thanks for comments. I have merged SecurityManager right now and updated with your comments. |
|
Jenkins, test this please |
|
Looks good to me pending tests |
|
QA tests have started for PR 1992 at commit
|
|
QA tests have finished for PR 1992 at commit
|
|
Jenkins, test this please |
|
QA tests have started for PR 1992 at commit
|
|
QA tests have finished for PR 1992 at commit
|
|
@mateiz retest this again, tests failed in sparkstreaming, thanks. |
|
Jenkins, test this please. |
|
hi @pwendell, jenkins fetch error. |
|
Jenkins, retest this please. |
|
QA tests have started for PR 1992 at commit
|
|
QA tests have finished for PR 1992 at commit
|
|
Merged this, thanks! |
https://issues.apache.org/jira/browse/SPARK-3010 this pr is to fix redundant conditional in spark, such as 1. private[spark] def codegenEnabled: Boolean = if (getConf(CODEGEN_ENABLED, "false") == "true") true else false 2. x => if (x == 2) true else false ... Author: scwf <[email protected]> Author: wangfei <[email protected]> Closes apache#1992 from scwf/condition and squashes the following commits: b2a044a [scwf] merge SecurityManager e16239c [scwf] fix confilct 6811401 [scwf] fix merge confilct 0824df4 [scwf] Merge branch 'master' of https://github.com/apache/spark into patch-4 e274515 [scwf] fix redundant conditions d032bf9 [wangfei] [SQL]Excess judgment
https://issues.apache.org/jira/browse/SPARK-3010
this pr is to fix redundant conditional in spark, such as
1.
private[spark] def codegenEnabled: Boolean =
if (getConf(CODEGEN_ENABLED, "false") == "true") true else false
2.
x => if (x == 2) true else false
...